Form, reading parameters
| From: | Jean Bresse | Date: | Mon, 08 Jul 2002 15:32:47 +0000 |
| Subject: | Form, reading parameters | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-14600@lists.php.net to get a copy of this message | ||
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