User:Woozle/PHP multi-select bug

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
Jump to: navigation, search

<php><?php

echo <<<__END__ <html> <body> __END__;

echo '$_POST contents:

'.print_r($_POST,TRUE).'

';

echo 'Raw POST header:['.file_get_contents("php://input").']';

echo <<<__END__


<form method=POST> <select name='test_select' multiple>

 <option value=1>The first option</option>
 <option value=2>The second option</option>
 <option value=3>The third option</option>

</select>
Select all three options and press the button: <input type=submit name=btnTest value="Yes, this button. Press me.">
You ought to see all three values returned, but there's only one. You can see all three in the Raw POST header, however. </form> </body> </html> __END__; </php> Submitted as bug #71549. Some discussion here.