diff --git a/register_participants.inc.php b/register_participants.inc.php
index 9e46277..331e02c 100644
--- a/register_participants.inc.php
+++ b/register_participants.inc.php
@@ -56,7 +56,7 @@ function studentStatus()
function projectStatus()
{
global $config;
- $required_fields=array("title","projectcategories_id","projectdivisions_id","summary","language");
+ $required_fields=array("title","projectcategories_id","projectdivisions_id","summary","language","req_table","req_electricity");
$q=mysql_query("SELECT * FROM projects WHERE registrations_id='".$_SESSION['registration_id']."' AND year='".$config['FAIRYEAR']."'");
diff --git a/register_participants_project.php b/register_participants_project.php
index bdf44b9..bf8c144 100644
--- a/register_participants_project.php
+++ b/register_participants_project.php
@@ -30,10 +30,34 @@ echo mysql_error();
}
$authinfo=mysql_fetch_object($q);
-
//send the header
send_header("Participant Registration - Project Information");
+ if($_POST['action']=="save")
+ {
+ //first, lets make sure this project really does belong to them
+ $q=mysql_query("SELECT * FROM projects WHERE id='".$_POST['id']."' AND registrations_id='".$_SESSION['registration_id']."' AND year='".$config['FAIRYEAR']."'");
+ if(mysql_num_rows($q)==1)
+ {
+ mysql_query("UPDATE projects SET ".
+ "title='".mysql_escape_string(stripslashes($_POST['title']))."', ".
+ "projectdivisions_id='".$_POST['projectdivisions_id']."', ".
+ "language='".mysql_escape_string(stripslashes($_POST['language']))."', ".
+ "req_table='".mysql_escape_string(stripslashes($_POST['req_table']))."', ".
+ "req_electricity='".mysql_escape_string(stripslashes($_POST['req_electricity']))."', ".
+ "req_special='".mysql_escape_string(stripslashes($_POST['req_special']))."', ".
+ "summary='".mysql_escape_string(stripslashes($_POST['summary']))."' ".
+ "WHERE id='".$_POST['id']."'");
+ echo mysql_error();
+ echo notice(i18n("Project information successfully updated"));
+ }
+ else
+ {
+ echo error(i18n("Invalid project to update"));
+ }
+ }
+
+
//now lets find out their MAX grade, so we can pre-set the Age Category
$q=mysql_query("SELECT MAX(grade) AS maxgrade FROM students WHERE registrations_id='".$_SESSION['registration_id']."'");
$gradeinfo=mysql_fetch_object($q);
@@ -74,16 +98,18 @@ echo mysql_error();
echo "<< ".i18n("Back to Participant Registration Summary")."
";
echo "
";
- echo "