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> Link to comment https://forums.phpfreaks.com/topic/119238-help-with-select-list/ 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"); Link to comment https://forums.phpfreaks.com/topic/119238-help-with-select-list/#findComment-614234 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.