ID: 30298 Updated by: [EMAIL PROTECTED] Reported By: ross dot w at paradise dot net dot nz -Status: Open +Status: Feedback Bug Type: Arrays related Operating System: Linux PHP Version: 4.3.8 New Comment:
Thank you for this bug report. To properly diagnose the problem, we need a short but complete example script to be able to reproduce this bug ourselves. A proper reproducing script starts with <?php and ends with ?>, is max. 10-20 lines long and does not require any external resources such as databases, etc. If possible, make the script source available online and provide an URL to it here. Try avoid embedding huge scripts into the report. Previous Comments: ------------------------------------------------------------------------ [2004-10-01 07:49:15] ross dot w at paradise dot net dot nz Description: ------------ The $_POST variable does not return an array (eg. from a select multiple box) but instead returns the word "Array". $HTTP_POST_VARS and register globals do not have this problem. Reproduce code: --------------- <select multiple="multiple" name="test[]"> <option name="o1">Option 1</option> <option name="o2">Option 2</option> <option name="o3">Option 3</option> </select> User selects some of these and clicks Submit Expected result: ---------------- I would expect that these three cases should be equal on the PHP receiving side: $arr = $_POST["test"]; $arr = $HTTP_POST_VARS["test"]; $arr = $test; (On systems with register globals) Actual result: -------------- Instead: $arr = $_POST["test"]; $arr is a string with the word "Array" (incorrect) $arr = $HTTP_POST_VARS["test"]; $arr is the array of selected items (correct) $arr = $test; On systems with register globals, $arr is the array of selected items (correct) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=30298&edit=1