From d9dc85c1d707b4eda4988ac30844b54f710998c8 Mon Sep 17 00:00:00 2001 From: james Date: Fri, 24 Feb 2006 18:28:21 +0000 Subject: [PATCH] properly detect when a school is selected under certain circumstances --- register_participants_students.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/register_participants_students.php b/register_participants_students.php index 8689206..e44eb71 100644 --- a/register_participants_students.php +++ b/register_participants_students.php @@ -121,7 +121,7 @@ if($_POST['action']=="save") { //if they use schoolpassword or singlepassword, then we dont need to save teh schools_id because its already set when they inserted the record, and we dont allow them to change their school. - if(( $config['participant_registration_type']=="schoolpassword" || $config['participant_registration_type']=="invite") && !$_POST['schools_id']) + if(( $config['participant_registration_type']=="schoolpassword" || $config['participant_registration_type']=="invite") && !$_POST['schools_id'][$x]) { $schoolquery=""; } @@ -381,7 +381,7 @@ if($config['participant_student_personal']=="yes") echo "\n"; echo " ".i18n("School").""; - if( $config['participant_registration_type']=="open" || $config['participant_registration_type']=="singlepassword" || !$studentinfo->schools_id ) + if( $config['participant_registration_type']=="open" || $config['participant_registration_type']=="singlepassword" || ($studentinfo && !$studentinfo->schools_id) ) { $schoolq=mysql_query("SELECT id,school FROM schools WHERE year='".$config['FAIRYEAR']."' ORDER by school"); echo "