#18765 [Com]: FORM POST fields are missing
| From: | dannysy at hotmail dot com | Date: | Mon, 12 Aug 2002 03:40:34 +0000 |
| Subject: | #18765 [Com]: FORM POST fields are missing | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-16522@lists.php.net to get a copy of this message | ||
ID: 18765
Comment by: dannysy@hotmail.com
Reported By: dannysy@hotmail.com
Status: Open
Bug Type: *General Issues
Operating System: Windows 95
PHP Version: 4.2.2
New Comment:
I'm not sure, but I don't think it's related to "multipart/form-data".
I've added the line phpinfo() to the sample.php scrift. The
content-type reported by phpinfo is
"application/x-www-form-urlencoded". I may be wrong as I'm a newbie to
PHP =)
Previous Comments:
------------------------------------------------------------------------
[2002-08-07 14:58:12] sander@php.net
Might be related to #18792
------------------------------------------------------------------------
[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