Hi I have a table that hold my category types and branch information table I have and im adding a new service call to my database i need the category type and branch my problem come when i have to edit the service call submitted , when i click on the edit link i wnat it to fetch the category and the branch dat i have added and i have to be able to edit it i can only do this using the standard select
<select name="category">
<option value="NS">Select Categories</option>
<option value="PC">Computer</option>
<option value="PRN">Printer</option>
</select>
and on my edit_call.php i will have something like this
//Category
echo "<table><tr><td><b>Category:</b><select name=\"category\">";
echo "<option value=\"PC\" ";
if ($category==PC)
echo "selected=\"yes\" ";
echo ">Computer</option>";
echo "<option value=\"PRN\" ";
if ($category==PRN)
echo "selected=\"yes\" ";
echo ">Printer</option>";
now I want use a dynamic dropdown list like but the problem is on my edit how do i update info on the dropdown and how do i view the same info that i have added or how i do i fetch info from the database using the dropdwon please help
<td><b>Category:</b></td><td><select name='category' value='NS'>
<?php
include('connection.php');
$Qxo="select * from Categories ORDER by name asc";
print "<option>Select Category</option>";
$cat=mysql_query($Qxo) or die ("cannot select form categories");
while ($list=mysql_fetch_array($cat))
{
print "<option value='$list[name]'>$list[name]</option>";
}
?>
</select></td>