Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Variables exist, don't work

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi everyone, i'm having a really odd problem. I'm trying to write a simple registration script, and it's giving me all kinds of problems. i've finally got to the point where after the form is filled out, it will transfer to the database script, but the thing is, the variables don't get transferred, or so i thought. all i was getting in the table were null entries, with the user id(using the mysql AUTO_INCREMENT option) being the only working thing. But here's the wierd part, when i use a while stript along with $HTTP_POST_VARS it lists all the variables perfectly. what could be going wrong? i can't print the variables or anything, the only way i can tell they exist is by the while loop or using GET instead of 'post' for the form method. if anyone knows what could be going wrong, let me know. thanks.

-James
 
Sounds to me like you have the "registar_globals" runtime configuration directive set to "off" in php.ini.

If you have a form tag with an input field named "foo", $foo will only be available if "registar_globals" is on. $HTTP_POST_VARS["foo"] will be.

Also, if you are running PHP 4.1.0 or newer, you should get in the habit of using $_POST rather than $HTTP_POST_VARS. The latter array will go away in a future version of PHP. ______________________________________________________________________
Don't say thanks. Just award stars.
______________________________________________________________________
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top