#18765 [Opn]: FORM POST fields are missing
| From: | sander@php.net | Date: | Wed, 07 Aug 2002 18:58:12 +0000 |
| Subject: | #18765 [Opn]: FORM POST fields are missing | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-16201@lists.php.net to get a copy of this message | ||
ID: 18765
Updated by: sander@php.net
Reported By: dannysy@hotmail.com
Status: Open
Bug Type: *General Issues
Operating System: Windows 95
PHP Version: 4.2.2
New Comment:
Might be related to #18792
Previous Comments:
------------------------------------------------------------------------
[2002-08-07 00:23:35] dannysy@hotmail.com
I'm using Xitami and PHP4.2.2 I have two files form.html and
sample.php. They both reside in c:\Xitami\webpages.
form.html contains the ff. scripts:
<html>
<head> Sample </head>
<body><BR>
<form method=POST action="sample.php">
<input type=text name="uname" size=10>
<input type=submit name="OK">
</form>
</body>
</html>
sample.php contains the ff. scripts:
<?
echo "<html>";
echo "<head> Sample </head>";
echo "<body>";
echo "Name is ".$_POST['uname']."<br>";
phpinfo();
echo "</body>";
echo "</html>";
?>
After submitting form.html, you'll get the index 'uname' not defined.
If you change the METHOD (in form.html) to GET and $_POST (in
sample.php) to $_GET, it works fine. I also noticed that the values
for all form fields can be found in the ENV array. They can be
accessed as 'FORM_'+field name in caps (ie FORM_UNAME).
Thanks in advance.
Danny
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=18765&edit=1