General Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingGeneral Programming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old January 7th, 2003, 10:45 AM
wareseeker wareseeker is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2002
Posts: 71 wareseeker User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 15 m 7 sec
Reputation Power: 6
Question Project Help?

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.
Attached Files
File Type: zip jokes.zip (1.6 KB, 268 views)

Reply With Quote
  #2  
Old January 11th, 2003, 09:55 AM
jpenn jpenn is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Location: Washington, DC
Posts: 317 jpenn User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 m 3 sec
Reputation Power: 6
Quote:
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.


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.




Reply With Quote
  #3  
Old January 12th, 2003, 03:45 AM
wareseeker wareseeker is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2002
Posts: 71 wareseeker User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 15 m 7 sec
Reputation Power: 6
Thank you for your respond!

Quote:
What version PHP you are running?

I have php-4.2.3-Win32 running on my Win XP locally.
Quote:
Also, post what book you have taken the example from....

The book is Building a Database-Driven Web Site Using PHP and MySQL by Kevin Yank.
Quote:
Also, please break your code out and post it on the board. Post any errors you may be having also.

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,

Reply With Quote
  #4  
Old January 12th, 2003, 10:13 AM
martin_dr martin_dr is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Location: Berkeley ,california
Posts: 9 martin_dr User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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.~~~~~

Reply With Quote
  #5  
Old January 12th, 2003, 01:23 PM
jpenn jpenn is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Location: Washington, DC
Posts: 317 jpenn User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 m 3 sec
Reputation Power: 6
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:
 extract$_POST ); 

If your script is also using get variables, add this at the top also ->
PHP Code:
 extract$_GET ); 

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingGeneral Programming Help > Project Help?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT