Re: Form, reading parameters

From: Date: Mon, 08 Jul 2002 15:54:07 +0000
Subject: Re: Form, reading parameters
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-14601@lists.php.net to get a copy of this message
try $_POST[''] instead of $HTTP_POST_VARS[''] this changed recently. also, $username probably doesn't work because you have register_globals turned off in your php.ini colin Jean Bresse wrote:
Hello: Took my first dip into the world on php over the weekend and got stumped on this: I cannot read the value of a form parameter. Here is the code: FORM: <html> <head> <title>COP Server</title> </head> <body> <form action="post1.php" method="post"> UserName: <input type="text" name="Username"><br> <input type="submit" name="Submit" value="Submit"> </form> </body> </html> POST1.PHP <html> <head> <title>Listing 1</title> </head> <body> <?php print(" The user name is: {$Username}<br>" ); print(" The user name is: {$HTTP_POST_VARS['Username']}<br>" ); ?> </body> </html> $HTTP_POST_VARS['Username'] does work but $Username does not. Could it be configuration related? (Installed Apache 1.3.21 with PHP 4.2.1 on Windows 2000 Server). Your help is most appreciated! Jean


« previous php.windows (#14601) next »