On Wed, 2004-09-01 at 14:05, 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 > > ????? > > > 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?
Learn to use print_r(), it will recursively print all the variables in your arrays and such. For example to debug this situation you can do something like: echo '<pre>'; print_r($POST); echo '</pre>'; and you'll see $POST is empty cause you typo'd it, it's $_POST not $POST. Use $_POST, not $HTTP_POST_VARS, the former is the newer array name and I imagine at some point $HTTP_POST_VARS will go away. -- Greg Donald -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php