A
Anonymous
Guest
hi guys...i've got a problem with the drop down list. some of the inputs that i asked from user is using the drop down list in the form. when i key in all the input, all the data save to the database successfully. but when i want to edit the input in the form after saving all in the database, i cant extract the value that user selected for the input in the drop down list. the value that will come out is the first value in the list. i dont know what i'm supposed to do about that. i guess maybe i should make an if statement or something like that...can anybody give me the explanation or sample codes????below i paste my codes:
********************************************************************************************************
<tr>
<td class="p5px left"> Working Shift </td>
<td class="p5px left"><select name="w2" selected = "<?php echo $shift;?>" >
<option value="shift">Morning </option>
<option value="shift">Afternoon </option>
<option value="shift">Night </option>
</select>
</td>
</tr>
********************************************************************************************************
<tr>
<td class="p5px left"> Working Shift </td>
<td class="p5px left"><select name="w2" selected = "<?php echo $shift;?>" >
<option value="shift">Morning </option>
<option value="shift">Afternoon </option>
<option value="shift">Night </option>
</select>
</td>
</tr>