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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Gather multiple values from scrolling menu 1

Status
Not open for further replies.

mpopnoe

Programmer
Feb 28, 2002
47
US
I'm trying to get all the values from a scrolling menu but only retrieve the last item selected by the user. Does anyone know how to get all the items selected in a multi select menu?
 
Use brackets in your select tag's name.

<FORM method=post>
<SELECT multiple name=&quot;foo[]&quot;>
.
.
.
</SELECT>
</FORM>

$_POST[&quot;foo&quot;] (or $HTTP_POST_VARS[&quot;foo&quot;])will then be an array of all the values selected. ______________________________________________________________________
My God! It's full of stars!
______________________________________________________________________
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top