PHP 4.0 Bug #8240: <select ... multiple> useless

From: Date: Wed, 13 Dec 2000 20:46:34 +0000
Subject: PHP 4.0 Bug #8240: <select ... multiple> useless
Groups: php.dev 
Request: Send a blank email to php-dev+get-41217@lists.php.net to get a copy of this message
From: joel@qulit.com Operating system: Linux 2.4.0-test11 PHP version: 4.0.3pl1 PHP Bug Type: Feature/Change Request Bug description: &lt;select ... multiple&gt; useless In the following example PHP would return just the last element of the selected options. <html> <form action="<?php print $PHP_SELF; ?>" method="post"> <select name="test" multiple> <option>abc <option>def <option>ghi </select> </form> </html> <?php var_dump ( $test ); ?> If method="get" is used, then the problem can be solved by manually interpreting the global variable $QUERY_STRING. But if you use the post method, then I can't see how it's possible to use <select>'s multiple attribut. One nice solution would be if PHP could return the variable as an array automatically. No problems with backwards compatiblity would occur since the multiple attribut has been impossible to use anyway. But to be sure noone will run into problems, maybe you guys could make it an option in php.ini? (That is, to automatically create an array if a value is sent to the script several times via GET or POST.) I'm really stuck here, since <select multiple> is the only solution to my problems, and using the GET method is out of question. It's just too lame. Thanks in advance for any advice or comments. -- Edit Bug report at: http://bugs.php.net/?id=8240&edit=1

« previous php.dev (#41217) next »