Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

#18765 [Com]: FORM POST fields are missing

0 views
Skip to first unread message

dan...@hotmail.com

unread,
Aug 11, 2002, 11:41:53 PM8/11/02
to
ID: 18765
Comment by: dan...@hotmail.com
Reported By: dan...@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] san...@php.net

Might be related to #18792

------------------------------------------------------------------------

[2002-08-07 00:23:35] dan...@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

0 new messages