RE: [PHP] newbie help, pressing the submit button returns nothing
| From: | John W. Holmes | Date: | Fri, 04 Apr 2003 12:50:22 +0000 |
| Subject: | RE: [PHP] newbie help, pressing the submit button returns nothing | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-142312@lists.php.net to get a copy of this message | ||
> Hi all, I have a real quick question. I'm trying to learn PHP and
right
> now im
> working with variables, anyway, I cannot get the code below to work
> correctly, could anyone help me out here the problem is, when you
submit
> the
> name, the name will not appear at all.
>
> <code below>
>
> <HTML>
> <FORM METHOD="post">
> Name:<br>
> <INPUT NAME="UserName" TYPE="text"><br>
> <INPUT TYPE="SUBMIT" VALUE="Enter">
> </FORM>
> <br>
> Your name is:
> <?php
>
> echo ($UserName);
> ?>
Use $_POST['UserName'] instead of just $UserName and do a search on
register_globals to find out why.
---John W. Holmes...
PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/