By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,925 Members | 1,863 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,925 IT Pros & Developers. It's quick & easy.

Posting and validating multiple select

P: 64
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>

PHP for getting variable

$service = $_POST["txtservice"];

And how can I validate this multiple select?
Aug 24 '07 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.