|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
I am learning PHP and MySQL, and I have followed the exact stuffs in the book but some how the scripts did not work as they explained. I don't know what is wrong? I am using local server on Win XP.
Description: the zip file has two files, db.sql and index.php. Everytime the script runs it lists all the jokes which are saved in the database, but it doen't work when I delete or add another joke. Please help me to figure it out. Greatly appreciative. |
|
#2
|
|||
|
|||
|
Quote:
Well, without looking at your code and going by the above, I have followed the exact stuffs in the book, I can guess that you are running into a register_globals problems. What version PHP you are running? Also, please break your code out and post it on the board. Post any errors you may be having also. Also, post what book you have taken the example from....
__________________
~ Joe Penn We work for free to help make this a valuable resource on the internet. Do you appreciate the help - did we provide help that will help you prosper and help that has contributed to sharpening your current skill set? Show your appreciation and purchase something from our Amazon Wishlist's - it's simple and a great way to say thank you. |
|
#3
|
|||||
|
|||||
|
Thank you for your respond!
Quote:
I have php-4.2.3-Win32 running on my Win XP locally. Quote:
The book is Building a Database-Driven Web Site Using PHP and MySQL by Kevin Yank. Quote:
I didn't have any errors, but the link on the example just did not respond to what it supposed to do, when I click add or delete a joke it just stayed there without any respond. Yesterday, I found a free server and uploaded the code and it worked. Here is the link where you could take a look and help me to find out why it doesn't work on the local machine. jokes Regards, |
|
#4
|
|||
|
|||
|
Your script can run on my machine.
My platform is win2000 pro+mysql+apache. Mybe there are some bugs in your database connection. First make sure that your local mysql server is working .~~~~~ And then in your php code,u had better echo the sql sentence out ,that can help u to debug your programme.~~~~~ ![]() |
|
#5
|
|||
|
|||
|
As I guessed in my first response - it is a register_globals problem. Not a problem, but register_globals is what is causing your problems. Add this at the top of your page ->
PHP Code:
If your script is also using get variables, add this at the top also -> PHP Code:
|
![]() |
| Viewing: Dev Articles Community Forums > Programming > General Programming Help > Project Help? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|