array of select (show selected)
Posted: Wed May 18, 2005 1:18 pm
having a brain failure I am. Figure this out right now I can not...
have the following code for a select I do:
need to show all of the options selected I do when submitted is the form. need to strip out of the array all of the values I do, know how I do not right now....
have the following code for a select I do:
Code: Select all
<select name="uid[]" size="5" multiple="multiple">
<?
while($gtusers = mysql_fetch_assoc($getusers)){
?>
<option value="<?=$gtusers['id'];?>" <?=(isset($_POST['uid']) && $_POST['uid'] == $gtusers['id'] ? "selected=\"selected\"" : "");?>><?=$gtusers['username'];?></option>
<?
}// end while for result set...burrito
?>
</select>