I need to display a dropdown list of hospitals several times (10) in one form and I'm not sure of the best way to go about this. I can get the first list to display, but the subsequent lists just show "Select". This is my code:
<td width=\"200\"><select name=\"hospital1\">
<option value=\"\"> -- Select -- </option>";
while ($row = mysql_fetch_array($sqlhosp_result)) {
$HospInsCo = $row["HospInsCo"];
echo "<option value=\"$HospInsCo\">$HospInsCo</option>";
}
echo "
</select></td>
I've tried duplicating this code but changing the select name to hospital2, etc. but, again, only get the "Select" option. I'd really like to be able to display the full list of hospitals for the first option and if the user selects a hospital, have that hospital deleted from subsequent lists and so on, but just displaying all the hospitals for all fields would work too.