Hi,
I've got some code which saves the business division into the main table. It does this fine, but when I want to review what has been entered into the table it will not display properly... not really explaining this well. Basically when the user hits edit, previous entery they should see all the data they previously entered and it allows them to ammend it. But the values that they previously chose should be visable, but they are not. Heres some snipits of code which should do it, or so I thought.
$sql_business_division_query=mysql_query("SELECT * FROM business_division ORDER BY division ASC"); //gets the business divisions
$sql_item_query=mysql_query("SELECT items.* ..... , business_division.division AS business_division ....
LEFT JOIN business_division ON items.division_ID=business_division.ID
<td class="field_display_text">
<select class='normal_form_field' name='division'>
<option value="">Select a division.....</option>
<option value=""></option>
<?php
while ($sql_business_division_row=mysql_fetch_array($sql_business_division_query))
{
if ($sql_business_division_row["ID"] == $sql_item_row["business_division_ID"])
{
print "<option value=\"".$sql_business_division_row["ID"]."\">".$sql_business_division_row["division"]."</option>";
} elseif($sql_business_division_row["active"]=="yes") {
print "<option value=\"".$sql_business_division_row["ID"]."\">".$sql_business_division_row["division"]."</option>";
}
}
?>
</select>
</td>