From: kapp at bigping dot de Operating system: UNIX/Linux but probabely all PHP version: 5.0.0b1 (beta1) PHP Bug Type: Unknown/Other Function Bug description: Arrays not accepted transmitted by HTTP GET/POST
Description: ------------ Normally when you have a 'select-array' in a HTML-form using the 'multiple="multiple"-Option' you should get back an array in PHP. Unfortunately PHP5 gives back only the last selected value instead of an array containing all the selected values. With the supplied HTML/PHP Code you can reproduce this. Reproduce code: --------------- <?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/2000/REC-xhtml1-20000126/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de"> <head> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> <title>Untitled</title> </head> <body> <form action="form.html" method="post"> <select name="myvar" multiple="multiple"> <option label="first" value="num1"></option> <option label="second" value="num2"></option> <option label="third" value="num3"></option> <option label="fourth" value="num4"></option> <option label="fifth" value="num5"></option> </select> <input type="submit" /> </form> <p> <?php print_r ($_POST); ?> </p> </body> </html> Expected result: ---------------- I expect to get back an array containing all the selected values. Actual result: -------------- Actually, only the last selected value is given back. -- Edit bug report at http://bugs.php.net/?id=24656&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=24656&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=24656&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=24656&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=24656&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=24656&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=24656&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=24656&r=support Expected behavior: http://bugs.php.net/fix.php?id=24656&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=24656&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=24656&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=24656&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=24656&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=24656&r=dst IIS Stability: http://bugs.php.net/fix.php?id=24656&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=24656&r=gnused