diff --git a/register_participants.inc.php b/register_participants.inc.php index 60040c79..9ee15a65 100644 --- a/register_participants.inc.php +++ b/register_participants.inc.php @@ -173,7 +173,7 @@ function mentorStatus($reg_id = '') $q->execute([$rid, $config['FAIRYEAR']]); $r = $q->fetch(PDO::FETCH_OBJ); - if ($r->nummentors === -1) { + if ($r->nummentors === -1 or $r->nummentors == null) { return 'incomplete'; } diff --git a/register_participants.php b/register_participants.php index e937f551..a07a7c22 100644 --- a/register_participants.php +++ b/register_participants.php @@ -304,13 +304,12 @@ if (get_value_from_array($_POST, 'action') == 'login' && (get_value_from_array($ $schoolidquery = 'null'; // actually insert it - $stmt = $pdo->prepare('INSERT INTO registrations (num, email, start, status, schools_id, year) VALUES (?, ?, NOW(), ?, ?, ?)'); + $stmt = $pdo->prepare("INSERT INTO registrations (num, email, start, status, schools_id, year) VALUES (?, ?, NOW(), ?, $schoolidquery, ?)"); $stmt->execute([ $regnum, $_SESSION['email'], 'new', - $schoolidquery, $config['FAIRYEAR'] ]); diff --git a/register_participants_mentor.php b/register_participants_mentor.php index c94bde05..6e2d076f 100644 --- a/register_participants_mentor.php +++ b/register_participants_mentor.php @@ -160,7 +160,7 @@ echo '