ID: 25474
Updated by: [email]sniperphp.net[/email]
Reported By: fmuller at cisco dot com
-Status: Open
+Status: Feedback
Bug Type: Apache2 related
Operating System: redhat 7.3
PHP Version: 4.3.3
New Comment:

Works fine for me. How did you configure PHP?
How did you configure PHP for Apache2?

Add this line to your test script:

echo $HTTP_RAW_POST_DATA;

And set "always_populate_raw_post_data" php.ini option to 'On'. Then
post the result here.



Previous Comments:
------------------------------------------------------------------------

[2003-09-10 14:30:47] fmuller at cisco dot com

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 this bug report at [url]http://bugs.php.net/?id=25474&edit=1[/url]