Jump to content

multiple select


dbutler

Recommended Posts

So I have created the following form in PHP/HTML:

$query = "SELECT * FROM STATUS ORDER BY status";$result = mysql_query($query)  or die ("Couldn't execute query.");echo "	<td><select multiple size='10' name='status'>\n";while ($row = mysql_fetch_array($result))	{	extract($row);	echo "<option value='$status'>$status\n";	}echo "</select></td>\n";

now note that I am using "multiple" in the html select statement. Since this form data is collected via a POST with a name of 'select', how do I retrieve ALL of the items that were selected? Right now when I pick up the $_POST['status'] variable it only results in the last item selected. I'm sure there is an easy answer, I just can't seem to figure this out as I am a begining programmer. Thanks! drb

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...