From d017f6ff3c20c79112c0edc364f99cd3483ae177 Mon Sep 17 00:00:00 2001 From: james Date: Fri, 5 Sep 2008 19:06:39 +0000 Subject: [PATCH] use the function to check complete status, and only after it has saved whatever was posted so the display is correct. --- register_participants_namecheck.php | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/register_participants_namecheck.php b/register_participants_namecheck.php index 4fe1a00..7bd00c4 100644 --- a/register_participants_namecheck.php +++ b/register_participants_namecheck.php @@ -47,14 +47,6 @@ exit; } - $namecheck_complete="yes"; - while($s=mysql_fetch_object($q)) - { - $student_display_name[] = "{$s->firstname} {$s->lastname}"; - if($s->namecheck_complete=="no") - $namecheck_complete="no"; - } - //send the header send_header("Participant Registration - Check Your Name"); @@ -84,12 +76,10 @@ //output the current status $newstatus=namecheckStatus($_SESSION['registration_id']); -if($newstatus!="complete") -{ +if($newstatus!="complete") { echo error(i18n("Name Check Incomplete. Please check your name and check all the boxes below")); } -else if($newstatus=="complete") -{ +else if($newstatus=="complete") { echo happy(i18n("Name Check Complete")); } @@ -120,7 +110,7 @@ else if($newstatus=="complete") echo "
\n"; echo "\n"; - $ch = ($namecheck_complete == 'yes') ? 'checked="checked"' : ''; + $ch = ($newstatus == 'complete') ? 'checked="checked"' : ''; echo " ".i18n('My name is correctly spelled'); echo '
';