I am using this code to offer the user options to select in a form. I only want
the user to able to select a record that exist for this value.
It works, except, there are of coarse dupicates because more than one record
has values for this column.
How can I eliminate the duplicates.
function cat() {
$one = "select Category from new order by Category ASC";
$result = mysql_query($one);
while (list($Category) = mysql_fetch_row($result))
{
print "<option>$Category</option>\n";
}
}
Then I call it like this
<TR><TD><B>Type</B></TD><TD><SELECT NAME="Category" SIZE=1>
<OPTION VALUE="">
<? cat(); ?>
</SELECT></TD></TR>
Please help.