forked from science-ation/science-ation
Fix the namecheck code
This commit is contained in:
parent
2bd3201196
commit
fe07722b5b
@ -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';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user