mutliple select form not passing multiple values
| From: | Ben Ramsey | Date: | Wed, 11 Feb 2004 21:22:33 +0000 |
| Subject: | mutliple select form not passing multiple values | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-177457@lists.php.net to get a copy of this message | ||
I'm running PHP 5.0b3, so I'm not sure whether this is an issue with the version of PHP I'm running.
I've got a select field in a form that is allowing multiple selects:
<select name="modules" size="10" multiple="multiple" id="modules" style="height: 150px;">
<option value="2" selected="selected">Banner Manager</option>
<option value="3" selected="selected">Calendar of Events</option>
<option value="4">Contacts</option>
<option value="5">Elections</option>
<option value="6" selected="selected">Emergency Notices</option>
<option value="11" selected="selected">Employment Opportunites</option>
<option value="7" selected="selected">FAQs</option>
<option value="8" selected="selected">Files & Downloads</option>
<option value="9">Image Gallery</option>
<option value="12">Links</option>
<option value="13" selected="selected">Meetings & Agendas</option>
<option value="1" selected="selected">News & Articles</option>
<option value="16" selected="selected">Notices of Public Hearing</option>
<option value="14" selected="selected">Procurement Opportunities</option>
<option value="15" selected="selected">Publications</option>
<option value="18">Weather Information</option>
</select>
I'm posting the data to another script, in which I have the following:
print_r($_POST);
The only thing that is being saved to $_POST['modules'] is the last value (15). When I count($_POST['modules']), I only get 1, so I know that it's not passing back an array of numbers like it should.
Am I doing something wrong?
-Ben