>> Hello,
>> Is there a way to handle data gathered from a drop down menu that
>> multiple selections using PHP?
>Of course. Name your select box as an array, and include the 'multiple'
><select name='something[]' multiple>
>Then you'll have an array on your processing page that holds all of the
>values that were selected. $_POST['something'][]. Note that it starts at
>You can use count($_POST['something']) to see how many were selected,

If you need specific IDs or something from the OPTIONs presented, other than
the text between the tags, you can even use the VALUE= attribute to pass
around data so that $_POST['something'] doesn't just start at 0 and count

  while (list($id, $name) = each($ineeddatacaptain)){
    echo "$id: $name<BR>\n";
<SELECT NAME=ineeddatacaptain[] MULTIPLE SIZE=5>
  <OPTION VALUE=1>Captain Kirk</OPTION>

If you click on Spock, instead of just 0, Spock, you'll get 2, Spock -- You
get his ID number as well as his name.

This is extremely convenient.  And you sure can't do that in ASP easily :-)

Like Music?  http://l-i-e.com/artists.htm

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to