diff --git a/register_participants_namecheck.php b/register_participants_namecheck.php index 7bd00c4..482c5f7 100644 --- a/register_participants_namecheck.php +++ b/register_participants_namecheck.php @@ -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'; - } + $q=mysql_query("UPDATE students SET namecheck_complete='yes' WHERE registrations_id='{$_SESSION['registration_id']}'"); } 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'; } } }