From: fmuller at cisco dot com
Operating system: redhat 7.3
PHP version: 4.3.3
PHP Bug Type: *Web Server problem
Bug description: posting arrays from a multiply selected select box not working
properly
Description:
------------
Red Hat 7.3/Apache 2.0/PHP 4.3.3.
If I select multiple selections on a select box,
with an array name,
with a form method of post
I do not get the array of selected values I expect.
If one option is selected it works fine.
If I use a method of get it works fine.
Here is what phpinfo.php displays when I select 1 and 2:
_REQUEST["param"]
Array
(
[0] => 1
[1] => 2param[]=1
[2] => 2
)
_POST["param"]
Array
(
[0] => 1
[1] => 2param[]=1
[2] => 2
)
Reproduce code:
---------------
<html>
<body>
<form method=post action=phpinfo.php>
<select name="param[]" multiple size=6>
<option value=0>0</option>
<option value=1>1</option>
<option value=2>2</option>
<option value=3>3</option>
<option value=4>4</option>
<option value=5>5</option>
<option value=6>6</option>
</select>
<input type=submit>
</form>
</body>
</html>
------------------
phpinfo.php
<?
phpinfo();
?>
Expected result:
----------------
_REQUEST["param"]
Array
(
[0] => 1
[1] => 2
)
_POST["param"]
Array
(
[0] => 1
[1] => 2
)
--
Edit bug report at http://bugs.php.net/?id=25474&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=25474&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=25474&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=25474&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=25474&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=25474&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=25474&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=25474&r=support
Expected behavior: http://bugs.php.net/fix.php?id=25474&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=25474&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=25474&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=25474&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=25474&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=25474&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=25474&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=25474&r=gnused