*sigh* … I just wasted a couple of hours trying to work out why a simple HTML form with a SELECT control that allowed multiple options was not POST-ing an array of those selected options to be processed by the script. Even the specs don’t mention anything about this.
No matter what i tried, the information contained in the POST data only included the last option that was selected, rather than the array of options like I expected.
As it turns out, you need to do some magic with the “name” part of the select statement to make this happen.
Rather than:
<select name="selectionlist" multiple>
You actually need:
<select name="selectionlist[]" multiple>
Sheesh !
Leave a Reply