Re: Form, reading parameters
| From: | Jean Bresse | Date: | Tue, 09 Jul 2002 13:40:58 +0000 |
| Subject: | Re: Form, reading parameters | ||
| References: | 1 2 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-14635@lists.php.net to get a copy of this message | ||
Thank you Colin, it solved it.
Jean
"Colin McDonald" <colin@tomoye.com> wrote in message
news:3D29B59F.9020606@tomoye.com...
> 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
> >
> >
>
>