Re: register global off

From: Date: Wed, 01 Sep 2004 19:34:31 +0000
Subject: Re: register global off
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-195452@lists.php.net to get a copy of this message
Afan Pasalic wrote:
I think I am a little bit "confused" about $HTTP_POST_VARS and $_POST. php.net manual: Note that $HTTP_POST_VARS and $_POST are different variables and that PHP handles them as such http://us4.php.net/reserved.variables
This just means that they don't occupy the same space in memory; $_POST is not a reference to $HTTP_POST_VARS and vice versa. If you make a change to one, the change doesn't carry over to the other.
And the example I wrote still doesn't work: <form method=post action=index.php> name <input type=text name=first_name> <input type=submit name=SubmitForm value=Submit> </form> After submitting $HTTP_POST_VARS['SubmitForm'] has value 'Submit' and $POST['SubmitForm'] is empty. Why's that?
Check to make sure you're using $_POST['SubmitForm'] and not $POST['SubmitForm']. -- Regards, Ben Ramsey http://benramsey.com --------------------------------------------------- http://www.phpcommunity.org/ Open Source, Open Community Visit for more information or to join the movement. --------------------------------------------------- PGP Key ID: 0x3968B5EE

« previous php.general (#195452) next »