I am need for some desperate help.
I have created an php file – adminindex.php, where the admin users have the facility to edit a form.
I am not able to recall the original value selected in the drop drown menu, every time this form is opened everything defaults back. I tried by best to get my head around it, but in vain.
This is the code for that form, the rest of the file is attached:
<tr>
<td class="hr">Phone Ext </td>
<td class="dr"><input type="text" name="PhoneExt" value="<? echo $row["PhoneExt"] ?>"></td>
<td class="hr">Location </td>
<td class="dr"><input type="text" name="Location" value="<? echo $row["Location"] ?>"></td>
<td class="hr">Equipment </td>
<td class="dr"><input type="text" name="Equipment" value="<? echo $row["Equipment"] ?>"></td>
</tr>
<tr>
<td class="hr">Subject </td>
<td class="dr" colspan=5><input size=90 type="text" name="Subject" value="<? echo $row["Subject"] ?>"></td>
</tr>
<tr>
<td class="hr">Fault Description </td>
<td class="dr" colspan=5><textarea name="FaultDescription" cols="80" rows="6" wrap="PHYSICAL"><? echo $row["FaultDescription"] ?></textarea></td>
</tr>
<tr>
<td class="hr">Urgency Value </td>
<td class="dr"><select name="UrgencyValue"><option value="Normal">Normal</option><option value="Critical">Critical</option>
<option value="High">High</option><option value="Low">Low</option><option value="Query">Query</option></select></td>
</tr>
For eg. Originally the value critical was selected the first time around, but when you come back to this form, the value is defaulted to ‘Normal’ – the first value in the dropdown menu.
Can anyone please correct this code and tell me where I am wrong?
Your help would be much appreciated.
Thank you.
Adi