I have a multiple select box in a form page. When I retrieve that form to update a record, the multiple select records show selected only if I selected one record. If I have multiple selectons, it does not show anything at all, and therefore, I get blank for this field when I click "Update". Can anyone please let me know how can I correct this problem? Thanks.
My code to show the selected records is below:
<tr bgcolor="#FFFFFF">
<td>Operating system:</td>
<td><select name="os[]" multiple="multiple">
<? while ($os_sys=mysql_fetch_array($osresult))
{
If ($os_sys["os"] == $data["os"])
{
echo "<option value='$os_sys[os]' selected>";
echo ucwords($os_sys['os']);
}
else
{
echo "<option value='$os_sys[os]'>";
echo ucwords($os_sys['os']);
}
}
?>
</select> (press ctrl+down arrow key for multiple selection)</td>
</tr>