diff --git a/admin/registration_receivedforms.php b/admin/registration_receivedforms.php index 7bad9218..0c8c95c7 100644 --- a/admin/registration_receivedforms.php +++ b/admin/registration_receivedforms.php @@ -217,14 +217,14 @@ echo mysql_Error(); else $projectnumber=$projectnum; + //get all students with this registration number + $recipients=getEmailRecipientsForRegistration($reg_id); + if($_POST['action']=="receivedyes") { //actually set it to 'complete' mysql_query("UPDATE registrations SET status='complete' WHERE num='$regnum' AND year='{$config['FAIRYEAR']}'"); - //get all students with this registration number - $recipients=getEmailRecipientsForRegistration($reg_id); - foreach($recipients AS $recip) { $to=$recip['to']; $subsub=array( @@ -250,9 +250,6 @@ echo mysql_Error(); //actually set it to 'paymentpending' mysql_query("UPDATE registrations SET status='paymentpending' WHERE num='$regnum' AND year='{$config['FAIRYEAR']}'"); - //get all students with this registration number - $recipients=getEmailRecipientsForRegistration($reg_id); - foreach($recipients AS $recip) { $to=$recip['to']; $subsub=array(