Jump to content

Help with select list


rdub

Recommended Posts

I currently use this to populate a select list. Need to make a change so that it will populate with all options except "individual". How might I do this?

 

<form ID="form1" Category Listing"form1" class="style1 style2" method="get" >

Business Categories:

<select name="select" class="style1 style2" onChange="next(form1.select.value);">

<option value="">--- Select ---</option>

<?

// Get records from database (table "member_list").

$list=mysql_query("select distinct Category_Listing from member_list order by Category_Listing");

 

// Show records by while loop.

while($row_list=mysql_fetch_assoc($list)){

?>

<option value="<? echo $row_list['Category_Listing']; ?>"

<? if($row_list['ID']==$select){ echo "selected"; } ?>>

<? echo $row_list['Category_Listing']; ?></option>

<?

// End while loop.

}

?>

</select>

</form>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.