From:             khalid_kary at hotmail dot com
Operating system: Linux
PHP version:      4.3.3
PHP Bug Type:     Scripting Engine problem
Bug description:  $_POST doesn't show the value of select form field when multiple=true

Description:
------------
$_POST doesn't list the value of a <select> form field where
multiple="true", while $_REQUEST does it just fine, $_POST only puts the
string "Array" in place of the form field's name.


Reproduce code:
---------------
HTML form:
<form action="something.php" method="post">
<select multiple="true" name="ids[]">
<option value="1">first option</option>
<option value="2">second option</option>
</select>
</form>

PHP script (something.php):
<?php
print_r($_POST['ids']);
?>

Output:
Array

Expected Ouput:
Array ([0] => 1, [1] => 2)

Another PHP Script:
<?php
print_r($_REQUEST['ids']);
?>

Output:
Array ([0] => 1, [1] => 2)

$_POST -therefore- is doing the wrong thing.


-- 
Edit bug report at http://bugs.php.net/?id=25421&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=25421&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=25421&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=25421&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=25421&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=25421&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=25421&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=25421&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=25421&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=25421&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=25421&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=25421&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=25421&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=25421&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=25421&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=25421&r=gnused

Reply via email to