diff --git a/register_participants_emergencycontact.php b/register_participants_emergencycontact.php
new file mode 100644
index 0000000..f89c48f
--- /dev/null
+++ b/register_participants_emergencycontact.php
@@ -0,0 +1,142 @@
+
+ require("common.inc.php");
+ include "register_participants.inc.php";
+
+ //authenticate based on email address and registration number from the SESSION
+ if(!$_SESSION['email'])
+ {
+ header("Location: register_participants.php");
+ exit;
+ }
+ if(!$_SESSION['registration_number'])
+ {
+ header("Location: register_participants.php");
+ exit;
+ }
+
+ $q=mysql_query("SELECT registrations.id AS regid, students.id AS studentid, students.firstname FROM registrations,students ".
+ "WHERE students.email='".$_SESSION['email']."' ".
+ "AND registrations.num='".$_SESSION['registration_number']."' ".
+ "AND registrations.id='".$_SESSION['registration_id']."' ".
+ "AND students.registrations_id=registrations.id ".
+ "AND registrations.year=".$config['FAIRYEAR']." ".
+ "AND students.year=".$config['FAIRYEAR']);
+echo mysql_error();
+
+ if(mysql_num_rows($q)==0)
+ {
+ header("Location: register_participants.php");
+ exit;
+
+ }
+ $authinfo=mysql_fetch_object($q);
+
+ //send the header
+ send_header("Participant Registration - Emergency Contact Information");
+
+ echo "<< ".i18n("Back to Participant Registration Summary")."
";
+ echo "
";
+
+ $studentstatus=studentStatus();
+ if($studentstatus!="complete")
+ {
+ echo error(i18n("Please complete the Student Information Page first"));
+ send_footer();
+ exit;
+ }
+
+
+ if($_POST['action']=="save")
+ {
+ //first, lets make sure this emergency contact really does belong to them
+ foreach($_POST['ids'] AS $id)
+ {
+ $q=mysql_query("SELECT * FROM emergencycontact WHERE id='$id' AND registrations_id='".$_SESSION['registration_id']."' AND year='".$config['FAIRYEAR']."'");
+ if(mysql_num_rows($q)==1)
+ {
+ mysql_query("UPDATE emergencycontact SET ".
+ "firstname='".mysql_escape_string(stripslashes($_POST['firstname'][$id]))."', ".
+ "lastname='".mysql_escape_string(stripslashes($_POST['lastname'][$id]))."', ".
+ "relation='".mysql_escape_string(stripslashes($_POST['relation'][$id]))."', ".
+ "phone1='".mysql_escape_string(stripslashes($_POST['phone1'][$id]))."', ".
+ "phone2='".mysql_escape_string(stripslashes($_POST['phone2'][$id]))."', ".
+ "phone3='".mysql_escape_string(stripslashes($_POST['phone3'][$id]))."', ".
+ "phone4='".mysql_escape_string(stripslashes($_POST['phone4'][$id]))."', ".
+ "email='".mysql_escape_string(stripslashes($_POST['email'][$id]))."' ".
+ "WHERE id='$id'");
+ echo mysql_error();
+ echo notice(i18n("Emergency contact information successfully updated"));
+ }
+ else
+ {
+ echo error(i18n("Invalid emergency contact to update (%1)"),array($id));
+ }
+ }
+ }
+
+
+
+//output the current status
+$newstatus=emergencycontactStatus();
+if($newstatus!="complete")
+{
+ echo error(i18n("Emergency Contact Information Incomplete"));
+}
+else if($newstatus=="complete")
+{
+ echo happy(i18n("Emergency Contact Information Complete"));
+
+}
+
+$sq=mysql_query("SELECT id,firstname,lastname FROM students WHERE registrations_id='".$_SESSION['registration_id']."' AND year='".$config['FAIRYEAR']."'");
+$numstudents=mysql_num_rows($sq);
+
+echo "