Backport namecheck fix from branch to trunk

This commit is contained in:
james 2008-11-07 04:41:44 +00:00
parent 065cb658bb
commit 2cebd4dc9f

View File

@ -41,12 +41,15 @@
$q=mysql_query("SELECT * FROM students WHERE registrations_id='{$_SESSION['registration_id']}'");
echo mysql_error();
if(mysql_num_rows($q)==0)
{
if(mysql_num_rows($q)==0) {
header("Location: register_participants.php");
exit;
}
while($s=mysql_fetch_object($q)) {
$student_display_name[]="{$s->firstname} {$s->lastname}";
}
//send the header
send_header("Participant Registration - Check Your Name");
@ -63,13 +66,9 @@
$pu = ($_POST['punc'] == 'yes') ? true : false;
if($sp && $ca && $pu) {
if($s->namecheck_complete!='yes') {
$q=mysql_query("UPDATE students SET namecheck_complete='yes' WHERE registrations_id='{$_SESSION['registration_id']}'");
$s->namecheck_complete = 'yes';
}
} else if($s->namecheck_complete!='no') {
$q=mysql_query("UPDATE students SET namecheck_complete='no' WHERE registrations_id='{$_SESSION['registration_id']}'");
$s->namecheck_complete = 'no';
}
}
}