From 2cebd4dc9f5269abfe08e290c920185944e2103b Mon Sep 17 00:00:00 2001
From: james <james>
Date: Fri, 7 Nov 2008 04:41:44 +0000
Subject: [PATCH] Backport namecheck fix from branch to trunk

---
 register_participants_namecheck.php | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/register_participants_namecheck.php b/register_participants_namecheck.php
index 7bd00c41..482c5f7f 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';
 		}
 	}
  }