Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to build add/remove multiple select form in php?

Status
Not open for further replies.

seahorse123

Programmer
Jul 25, 2005
39
0
0
US
I want to create two multiple select box, with four buttons(Add, Add All, Remove, Remove All) between them, user can select one or more item from one side, then click the button so it will be shown on the other side, how can I do that in php? any suggestion will be appreciated.

 
I assume you're talkina about:

<select multiple.....>


The way to get all the select's multiple values into PHP is to name the select as if it were an array:

<select multiple name="foo[]"....>

When submitted, $_POST['foo'] or $_GET['foo'] will itself be an array containing all the selected values.


Want the best answers? Ask the best questions!

TANSTAAFL!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top