Php Not Posting

liunx

Guest
This is the script I am using to post to a db.<br /><br /><edited out by GatorGuy><br /><br /><br /><br />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. <br /><br />Any thoughts?<br /><br /><br />EDIT: Got it working. I had added new fields in the DB and forgot to add them to the PHP files.<!--content-->
If you're using a form to feed data into this script, then I'm surprised it was working before.<br />To access the data posted from a form, you need to use the $_POST global variable, not $_GET <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/wink.gif" style="vertical-align:middle" emoid=";)" border="0" alt="wink.gif" /><br /><br />Try changing that and let me know if it works <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /><!--content-->
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.<!--content-->
That's really strange <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/huh.gif" style="vertical-align:middle" emoid=":huh:" border="0" alt="huh.gif" /><br />Try changing it to $_POST and let me know how it goes.<!--content-->
Sorry for the long dely. I am installing Apahe on a server.<br /><br />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. <br /><br />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.<!--content-->
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.<br /><br />But anyway, I'm glad you got it working <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /><!--content-->
I'm all for the POST method. I was just using GET for some testing.<!--content-->
 
Back
Top