Hi All,
I have the follow code which searches for teams in my database and displays them in a drop down menu! I loop this code and add serveral teams under one group!
This works well when I'm adding something new but
When I go to edit the group I want to display all my options but have it default to the selected team!
Keep in mind the list will change as I edit this as well!!
Any ideas?
<select size="1" name="team1_id<?php echo $i ?>">
<?php
$result3 = mysql_query ("SELECT * From results_comp_run_teams where comp_run_id = $comp_run_id");
while($row3 = mysql_fetch_array($result3))
{
$teamid = $row3["team_id"];
$result4 = mysql_query ("SELECT * from results_team where team_id = $teamid");
$row4 = mysql_fetch_array($result4);
?>
<option value="<?php echo $row4["team_id"]; ?>"><?php echo $row4["team_name"]; ?></option>
<?php
}
?>
</select>