Connecting Tech Pros Worldwide Forums | Help | Site Map

Posting and validating multiple select

Member
 
Join Date: Nov 2006
Posts: 64
#1: Aug 24 '07
i have a multiple drop down with five items..

If i select 2 or more items and post, only one item is posted to the db!
How do I make it post all the fields I have selected?


The HTML list

<select name="txtservice" size="3" id="txtservice" multiple>
<option value="1">Wrapping and Storage</option>
<option value="2">Logistics and warehousing supervision </option>
<option value="3">Loading and Unloading</option>
<option value="4">Packing and Labelling</option>
</select>

PHP for getting variable

$service = $_POST["txtservice"];

And how can I validate this multiple select?

Reply