GatorGuy Posted September 5, 2004 Posted September 5, 2004 This is the script I am using to post to a db. <edited out by GatorGuy> As of last night it was working fine when I sent it data from a form. As of this morning when I post data to it I still get the "sending....!" message but the data never makes it to the db. Nothing has been changed so there should not be a reason that it isn't working. Any thoughts? EDIT: Got it working. I had added new fields in the DB and forgot to add them to the PHP files. Quote
borfast Posted September 5, 2004 Posted September 5, 2004 If you're using a form to feed data into this script, then I'm surprised it was working before. To access the data posted from a form, you need to use the $_POST global variable, not $_GET Try changing that and let me know if it works Quote
GatorGuy Posted September 5, 2004 Author Posted September 5, 2004 I was using POST and switched to _GET for some testing. They both worked just fine. I am going to switch back to the POST method before I take the scripts live. Quote
borfast Posted September 5, 2004 Posted September 5, 2004 That's really strange Try changing it to $_POST and let me know how it goes. Quote
GatorGuy Posted September 5, 2004 Author Posted September 5, 2004 Sorry for the long dely. I am installing Apahe on a server. I was able to get the script working. I had added two fields to the table using phpmyadmin and forgot to add them to the script. When I did it went back to adding the data to the DB. On a site note though, _GET does work if you don't mind the values in the URL. I will be using POST on the final run though. Quote
borfast Posted September 5, 2004 Posted September 5, 2004 Well, it will work that way if you set "get" as the form method, which is not the usual way of doing it and not recommended, as you probably know. But anyway, I'm glad you got it working Quote
GatorGuy Posted September 5, 2004 Author Posted September 5, 2004 I'm all for the POST method. I was just using GET for some testing. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.