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
>
>
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php