From f369120fcc59aafa80356e2f34d672cc4e160811 Mon Sep 17 00:00:00 2001 From: Joshua Perry <45966243+jpez-development@users.noreply.github.com> Date: Mon, 23 Jan 2023 18:59:40 +0000 Subject: [PATCH] fixed apply and save --- CSY2028/DatabaseTable.php | 8 ++++---- templates/apply.html.php | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CSY2028/DatabaseTable.php b/CSY2028/DatabaseTable.php index 1002e48..8e50dcb 100644 --- a/CSY2028/DatabaseTable.php +++ b/CSY2028/DatabaseTable.php @@ -62,14 +62,14 @@ class DatabaseTable { } public function save($record) { - if (\empty($record[$pk])) { - \unset($record[$pk]); + if (empty($record[$this->pk])) { + unset($record[$this->pk]); } try { - insert($record); + $this->insert($record); } catch (\Exception $e) { - update($record); + $this->update($record); } } } diff --git a/templates/apply.html.php b/templates/apply.html.php index 7f2e31f..5a7d45f 100644 --- a/templates/apply.html.php +++ b/templates/apply.html.php @@ -7,7 +7,7 @@

Apply for title?>

-
+