diff --git a/register_participants_students.php b/register_participants_students.php index 0799ec3..4388b33 100644 --- a/register_participants_students.php +++ b/register_participants_students.php @@ -42,40 +42,40 @@ echo mysql_error(); //although... this can never really happen, since the above queries only allow the page to view if the student //is found in the students table... soo... well, lets leave it here as a fallback anyways, just incase mysql_query("INSERT INTO students (registrations_id,email,year) VALUES ('".$_SESSION['registration_id']."','".mysql_escape_string($_SESSION['email'])."','".$config['FAIRYEAR']."')"); - } - else if(mysql_num_rows($q)==1) - { - $numstudents1="checked=\"checked\""; - $numstudents2=""; - - } - else if(mysql_num_rows($q)==2) - { - $numstudents1=""; - $numstudents2="checked=\"checked\""; - + //if we just inserted it, then we will obviously find 1 + $numfound=1; } else { - //this should never happen - //we cant have more than two on a project - echo error(i18n("More than two students associated with this registration")); - //FIXME: eventually provide a solution to fix this if it ever happens.. like say.... - // "click here" to remove all students and start again.. or something + $numfound=mysql_num_rows($q); } - echo "
"; + if($_GET['numstudents']) + $numtoshow=$_GET['numstudents']; + else + $numtoshow=$numfound; - for($x=1;$x<=2;$x++) + for($x=1;$x<=$numtoshow;$x++) { $studentinfo=mysql_fetch_object($q); - echo "".i18n("Name").": | name\"> |