After the user clicks a button, I would like to reset the chosen value of a drop down menu. For example, if I have the following drop down menus:
<?
for (i =0; i<7; i++){
?>
<span class="style1">Out</span>
<td width=""><select id="stop<? echo $i ?>" name= "stop<? echo $i ?>">
<option value="0" default></option>
<option value="0">12:00 AM</option>
<option value="0.5">12:30 AM</option>
<option value="1">1:00 AM </option>
<?
}
?>
How can I change the option value from 0 to 12:00 AM so that 12:00 AM gets saved to the database (and not the 0)? Is there something in php that I do something like:
stop1 option value = stop1 option text
Please note, for a good reason (and I dont want to get into because its just a long story), I cannot recode the above option values to the following (if I could, I wouldnt be posting this):
<option value="12:00 AM">12:00 AM</option>
<option value="12:30 AM">12:30 AM</option>
<option value="1:00 AM">1:00 AM </option>
Any help is greatly appreciated! =)