Hello everyone....
I've created a form which include text field, radio button and comboboxes. When user needs to edit the form, it will be loaded with the current values, and user can edit it by changing those values.
The problem is: If the changes is within the combobox, the value selected will be as per the selected one. But if there are no changes within the combobox, when user click submit, it will only save the first word from the combobox.
Below is the coding that I've used:
<tr>
<td><strong>Person In Charge (PIC):</strong></td>
<td width="31%"><select name="pic" onChange="showValue_pic_others();">
<option value=<?php echo "$row[pic]" ?> selected><?php echo "$row[pic]" ?></option>
<option value="Dr. Marina Tan">Dr. Marina Tan</option>
<option value="Ms Amy Masni">Ms Amy Masni</option>
<option>Others</option>
</select></td>
<td width="33%"><div id="pic_others" style="position:relative; z-index:1; visibility:hidden; width: 117px; height: 21px;">
<input type="text" name="pic_others" id="pic_others">
</div></td>
<td> </td>
</tr>
If I didn't edit this combobox, the value that is submitted by the edit form will be the first word "Dr." for "Dr. Marina Tan" and "Ms" for "Ms Amy Masni". Is there anyone who can help me debug this problem? Please....