rdub Posted August 12, 2008 Share Posted August 12, 2008 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> Quote Link to comment Share on other sites More sharing options...
toplay Posted August 12, 2008 Share Posted August 12, 2008 $list=mysql_query("select distinct Category_Listing from member_list where Category_listing != 'individual' order by Category_Listing"); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.