Bug #17958: <input type=file> loses $_POST vars
| From: | ddp at deakin dot edu dot au | Date: | Tue, 25 Jun 2002 04:28:54 +0000 |
| Subject: | Bug #17958: <input type=file> loses $_POST vars | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-12002@lists.php.net to get a copy of this message | ||
From: ddp@deakin.edu.au
Operating system: Linux 2.4.18
PHP version: 4.2.1
PHP Bug Type: Scripting Engine problem
Bug description: <input type=file> loses $_POST vars
When I include an <input type=file> in a form and post it (whether or not I
actually upload a file) the $_POST vars are cut short. This is with
Apache-2.0.39 and both php-4.2.1 and with a CVS version (from 25 June
2002).
See the script (tst.php) below:
<html>
<head>
<title>File Upload Test</title>
<meta http-equiv="Content-Type" content="text/html;">
</head>
<body bgcolor="#FFFFFF">
<pre>
<?php
print "print_r( $_POST ) :";
if (isset($_POST)) { print_r($_POST); }
?>
</pre>
<form enctype="multipart/form-data" action="tst.php"
method="post">
<input type="hidden" name="VAR1" value="1">
Send this file: <input type="file" name="userfile[]">
<!-- comment out the line above for VAR2 to be successfully
posted
-->
<input type="hidden" name="VAR2" value="2">
<input type="submit" value="Test">
</form>
</body>
</html>
--
Edit bug report at http://bugs.php.net/?id=17958&edit=1
--
Fixed in CVS: http://bugs.php.net/fix.php?id=17958&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=17958&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=17958&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=17958&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=17958&r=support
Expected behavior: http://bugs.php.net/fix.php?id=17958&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=17958&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=17958&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=17958&r=globals