Hi, is there a way to pre-select an item in an Select field?
Lets say i have an $currentCity=3;
Is it then possible to show the site with item 3 in the select box selected?
I've tried so many things but I cant get it to work 🙁
<form ACTION="index.php" method="post" name"current">
<td width="140" align="center" valign="middle">
Current City:<BR>
<select name="currentCity">
<?
while ($tellerCity < $num_rowsCity)
{
$city=mysql_result($resultCity, $tellerCity, "name");
print"<option value=\"$tellerCity\" name=\"currentCity\">$city\n";
$tellerCity++;
}
$tellerCity=0;
?>
</select>
</td>
<td width="33" align="center" valign="middle">
<input type="submit" name="subCurrent" value="Go"></td>
</form>