hi guys,
i wonder if someone could help, i am teaching myself
with tutorials and online books etc PHP, ive played around in it before, but due to time i couldn't get into it. now im going headlong into it.
anyway moving on, the problem i have is, i have a racers booking in record.
for example looks like
Racer: name
Committee: name
etc etc
basically, the racer books in via the committee member.
now what i want to do is to be able to edit the form, so that on the edit page, the committee member is a drop down box (this i can do)
but i cannot seem to get it to auto select the committee member that has taken the book in, instead it just defaults to the first committee member.
any ideas?
$sql_com = "SELECT * FROM tbl_Committee";
$res_com = mysql_query($sql_com) or die ("emps". mysql_error());
?>
<tr><td>Committee: </td><td>
<?php
$dropdown = "<select name='committee'>";
while($row_com = mysql_fetch_assoc($res_com)) {
$dropdown .= "\r\n<option value='{$row_com['com_FirstName']}'>{$row_com['com_FirstName']}</option>";
}
$dropdown .= "\r\n</select>";
echo $dropdown;
?>