From d9c2aa38e6d8f835168da5cc7c38c47dd60911b0 Mon Sep 17 00:00:00 2001 From: patrick Date: Thu, 13 Mar 2025 17:11:20 +0000 Subject: [PATCH] Fix judge questions --- judge_other.php | 2 +- questions.inc.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/judge_other.php b/judge_other.php index bf55b783..d03534d3 100644 --- a/judge_other.php +++ b/judge_other.php @@ -82,7 +82,7 @@ switch (get_value_from_array($_GET, 'action')) { user_save($u); - if($POST['questions']) + if($_POST['questions']) questions_save_answers('judgereg', $u['id'], $_POST['questions']); happy_('Preferences successfully saved'); diff --git a/questions.inc.php b/questions.inc.php index 7ecd00a8..7458d00a 100644 --- a/questions.inc.php +++ b/questions.inc.php @@ -268,9 +268,9 @@ function questions_editor($section, $year, $array_name, $self) $q->execute([$_GET['impyear']]); while ($r = $q->fetch(PDO::FETCH_OBJ)) { $x++; - $stmt = $pdo->prepare("INSERT INTO questions (id,year,section,db_heading,question,type,required,ord) - \t\t\t\t\t\t\t\t\tVALUES (?,?,?,?,?,?,?)"); - $stmt->execute([$year, $r->section, $r->question, $r->type, $r->required, $r->ord]); + $stmt = $pdo->prepare("INSERT INTO questions (year,section,db_heading,question,type,required,ord) + VALUES (?,?,?,?,?,?,?)"); + $stmt->execute([$year, $r->section, $r->db_heading, $r->question, $r->type, $r->required, $r->ord]); } echo happy(i18n(