select all
Posted: Thu Jan 27, 2005 12:50 pm
I've been looking around forums/google and can't find the answer to my problem. I want to include a "select all" option in a drop down menu. I am populating the menu dynamically. So here the the code:
Code: Select all
print "Product: ";
print "<SELECT NAME='products' onChange='this.form.submit();'>";
print "<OPTION value=''>Select a product</OPTION>";
print "<OPTION value=''>All</OPTION>";
$options="products";
while ($row = @ mysql_fetch_array($result))
{
$id=$rowї"id"];
$products=$rowї"product"];
$options=$products;
print "<OPTION>$options</OPTION>";
} // end while loop body
} // end if $rowsFound body
print "</SELECT>" ."<br>" ."<br>" ;