I have made a drop down menu from a mysql table, and I want to reatin the value selected in my form. Any help would be great I've tryed reading other forums but can't get it..... I need to use the name, and agentid because I will need it for my linked page
Thanks!!
Thanks!!
Code:
<?php
$query="SELECT name,agentid FROM agents";
$result = mysql_query ($query);
echo "<select name=agent value=''>Agent Name</option>";
while($nt=mysql_fetch_array($result)){//Array or records stored in $nt
echo "<option value=$nt[id]>$nt[name]</option>";
}
echo "</select>";//
?>
Comment