I've created that a drop down that shows the selected value for editing but allows for selection if adding to the database.
Im trying to add an option in there with a value of nothing, if something inthe drop down isnt selected.
Hope you know what I mean.
Here is my code:
<select name="pcats" size="1">
<?php $qw=mysql_query("select cat_Id, category_Name from category order by category_Name ASC") or die (mysql_error());
echo "<option value='$r[cat_Id]' selected>$r[category_Name]</option>";
echo "<option value='$r[cat_Id]'>$r[category_Name]</option>";
The empty option need to go in the second echo.
This topic is now closed. New replies are no longer allowed.