Jump to content

Posting and validating multiple select


gnawz

Recommended Posts

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?

Link to comment
https://forums.phpfreaks.com/topic/66471-posting-and-validating-multiple-select/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.