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

From: Date: Wed, 13 Dec 2000 22:07:23 +0000
Subject: PHP 4.0 Bug #8240 Updated: <select ... multiple> useless... RTFM
Groups: php.dev 
Request: Send a blank email to php-dev+get-41231@lists.php.net to get a copy of this message
ID: 8240 Updated by: jmoore Reported By: joel@qulit.com Old-Status: Open Status: Closed Bug Type: Feature/Change Request Assigned To: Comments: User found answer in Manual Previous Comments: --------------------------------------------------------------------------- [2000-12-13 16:06:29] joel@qulit.com Sorry.. You can delete this ''bug''. I found it in the manual. --------------------------------------------------------------------------- [2000-12-13 15:46:34] joel@qulit.com 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. --------------------------------------------------------------------------- Full Bug description available at: http://bugs.php.net/?id=8240

« previous php.dev (#41231) next »