and make sure the setting doesn't override an existing school entry

This commit is contained in:
justin 2010-07-13 19:23:18 +00:00
parent c877ce1f95
commit 39c402f3f5

View File

@ -430,7 +430,11 @@ if($config['participant_student_personal']=="yes")
echo "<option value=\"\">".i18n("Choose School")."</option>\n";
while($r=mysql_fetch_object($schoolq))
{
if($studentinfo->schools_id==$r->id || $lastSchool ==$r->id) $sel="selected=\"selected\""; else $sel="";
if($studentinfo->schools_id==$r->id || (!$studentinfo->schools_id && $lastSchool ==$r->id)) {
$sel="selected=\"selected\"";
} else {
$sel="";
}
echo "<option $sel value=\"$r->id\">".htmlspecialchars($r->city).' - '.htmlspecialchars($r->school)."</option>\n";
}