diff --git a/register_participants.inc.php b/register_participants.inc.php index 331e02c..9c93a49 100644 --- a/register_participants.inc.php +++ b/register_participants.inc.php @@ -30,7 +30,7 @@ function outputStatus($status) function studentStatus() { global $config; - $required_fields=array("firstname","lastname","address","city","postalcode","phone","email","grade"); + $required_fields=array("firstname","lastname","address","city","postalcode","phone","email","grade","dateofbirth","schools_id","tshirt"); $q=mysql_query("SELECT * FROM students WHERE registrations_id='".$_SESSION['registration_id']."' AND year='".$config['FAIRYEAR']."'"); diff --git a/register_participants_students.php b/register_participants_students.php index 55d2795..21a525c 100644 --- a/register_participants_students.php +++ b/register_participants_students.php @@ -46,7 +46,7 @@ if($_POST['action']=="save") { //INSERT new record $dob=$_POST['year'][$x]."-".$_POST['month'][$x]."-".$_POST['day'][$x]; - mysql_query("INSERT INTO students (registrations_id,firstname,lastname,email,address,city,province,postalcode,phone,dateofbirth,grade,year) VALUES (". + mysql_query("INSERT INTO students (registrations_id,firstname,lastname,email,address,city,province,postalcode,phone,dateofbirth,grade,schools_id,tshirt,year) VALUES (". "'".$_SESSION['registration_id']."', ". "'".mysql_escape_string(stripslashes($_POST['firstname'][$x]))."', ". "'".mysql_escape_string(stripslashes($_POST['lastname'][$x]))."', ". @@ -58,6 +58,8 @@ if($_POST['action']=="save") "'".mysql_escape_string(stripslashes($_POST['phone'][$x]))."', ". "'$dob', ". "'".mysql_escape_string(stripslashes($_POST['grade'][$x]))."', ". + "'".mysql_escape_string(stripslashes($_POST['schools_id'][$x]))."', ". + "'".mysql_escape_string(stripslashes($_POST['tshirt'][$x]))."', ". "'".$config['FAIRYEAR']."')"); echo mysql_error(); @@ -78,7 +80,9 @@ echo mysql_error(); "postalcode='".mysql_escape_string(stripslashes($_POST['postalcode'][$x]))."', ". "phone='".mysql_escape_string(stripslashes($_POST['phone'][$x]))."', ". "dateofbirth='$dob', ". - "grade='".mysql_escape_string(stripslashes($_POST['grade'][$x]))."' ". + "grade='".mysql_escape_string(stripslashes($_POST['grade'][$x]))."', ". + "schools_id='".mysql_escape_string(stripslashes($_POST['schools_id'][$x]))."', ". + "tshirt='".mysql_escape_string(stripslashes($_POST['tshirt'][$x]))."' ". "WHERE id='".$_POST['id'][$x]."'"); echo notice(i18n("%1 %2 successfully updated",array($_POST['firstname'][$x],$_POST['lastname'][$x]))); @@ -164,11 +168,11 @@ if($_GET['action']=="removestudent") echo "\n"; echo "