From 8e493d574a3a54f23041f47617545b19e6193573 Mon Sep 17 00:00:00 2001 From: filippo.bertilotti <filippobertilotti@gmail.com> Date: Tue, 11 Jun 2024 11:18:23 +0200 Subject: [PATCH] fix foreach --- src/App/Controllers/fiat.php | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/src/App/Controllers/fiat.php b/src/App/Controllers/fiat.php index b107467..c352617 100644 --- a/src/App/Controllers/fiat.php +++ b/src/App/Controllers/fiat.php @@ -30,6 +30,7 @@ } public function contact() { + if($_SERVER['REQUEST_METHOD'] === 'POST') { $data = [ "email" => $this->request->post["email"], @@ -38,9 +39,10 @@ $this->model->insert($data); } - + $errors = $this->model->getErrors(); return $this->view("Fiat/contact.mvc.php", [ + "errors" => $errors ]); } -- Gitblit v1.8.0