Hello, i am trying to create a form that allows the user to update their database site. I am having problems with some dropdown menus which i want to display the existing categories under which their stock is organised. I have a dropdown menu displaying existing categories and a text input field for entering a new category. But my problem at the moment is that it is not displying my existing categories...can anyone tell me why? Thanks
$db = mysql_connect("localhost","root");
mysql_select_db("test",$db);
echo "<select name=\"category\">
<option selected>select existing category.......</option>";
$result = mysql_query("SELECT * FROM general GROUP BY category",$db);
while ($myrow = mysql_fetch_array($result)) {
printf ("<option value=\"$myrow[category]\">$myrow[category]\n");}
echo "</select>";