Bug #10533 Updated: empty POST variables when file uploads disabled
| From: | sniper@php.net | Date: | Fri, 15 Jun 2001 14:58:00 +0000 |
| Subject: | Bug #10533 Updated: empty POST variables when file uploads disabled | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-56823@lists.php.net to get a copy of this message | ||
ID: 10533
Updated by: sniper
Reported By: nolan@peaceworks.ca
Old-Status: Open
Status: Closed
Bug Type: Variables related
Operating system:
PHP Version: 4.0.4pl1
Assigned To:
Comments:
With PHP 4.0.6RC3 this works just fine for me.
(should work with 4.0.5 too as the code in question hasn't changed)
Previous Comments:
---------------------------------------------------------------------------
[2001-04-27 23:08:17] nolan@peaceworks.ca
I'm not sure if this is a bug or a feature, but I came across it while thinking that having GET
and POST variables together were causing a problem. Turns out it was POST variables not being passed
when file uploads were disabled and the enctype was multipart. Here's my synopsis:
If I have these two files....
testform.php:
<form action="testout.php?q=1" method="post">
<input type="text" name="f">
<input type="submit">
</form>
and testout.php:
<?
echo "q: $q<br>";
echo "f: $f<br>";
?>
then, say I request testform.php in a browser and type "hello" in the field. I get back
this when I submit...
q: 1
f: hello
looks good so far, but if I then change the form to look like this:
<form action="testout.php?q=1" method="post"
enctype="multipart/form-data">
then I re-request the page and type "hello" in the field, and submit...I get this:
q: 1
f:
*oops*...looks like the multipart/form-data encoding type makes the form variables go away.
Interesting...but changing the POST to a GET seems to work. What if I don't want the variables
in the query string, though?
I check the php.ini and discover that file uploads are disabled. I enable file uploads and voila! it
works!!! now I get...
q: 1
f: hello
regardless of whether I use POST or GET. Since file uploads were disabled, I assumed that file
widgets would not be allowed to pass data, but I didn't think that having a form with
multipart/form-data as the encoding type would disable POSTing in general when file uploads were
disabled.
So...is it a feature, or is it a bug?
---------------------------------------------------------------------------
ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=10533&edit=2