aboutsummaryrefslogtreecommitdiff
path: root/controllers
diff options
context:
space:
mode:
authorThedro Neely <thedroneely@gmail.com>2019-03-16 04:43:32 -0400
committerThedro Neely <thedroneely@gmail.com>2019-03-16 04:43:32 -0400
commitf01f3478c4992d9ffba7765254c0569af20cabe6 (patch)
tree94cfd0ece24be7dd4f1acb471be8d18a7bb2bed3 /controllers
parent2460ee3262d2ecd5e6bf0ecd5c9aca859337138c (diff)
downloadedwinmattiacci.com-f01f3478c4992d9ffba7765254c0569af20cabe6.tar.gz
edwinmattiacci.com-f01f3478c4992d9ffba7765254c0569af20cabe6.tar.bz2
edwinmattiacci.com-f01f3478c4992d9ffba7765254c0569af20cabe6.zip
controllers/contact: Let the view use alternate variables
Set them to null when successful on the view
Diffstat (limited to 'controllers')
-rw-r--r--controllers/contact.controller.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/controllers/contact.controller.php b/controllers/contact.controller.php
index 0f988f3..cdba14e 100644
--- a/controllers/contact.controller.php
+++ b/controllers/contact.controller.php
@@ -7,9 +7,9 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
$submit = new Form();
- $submit->name = $_POST['26471'] ?? null;
- $submit->email = $_POST['26472'] ?? null;
- $submit->message = $_POST['26473'] ?? null;
+ $submit->name = $name = $_POST['26471'] ?? null;
+ $submit->email = $email = $_POST['26472'] ?? null;
+ $submit->message = $message = $_POST['26473'] ?? null;
$spam = $_POST['agree'] ?? false;
@@ -36,6 +36,10 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
$formSuccess = true;
+ $name = null;
+ $email = null;
+ $message = null;
+
include '../views/contact.view.php';
fastcgi_finish_request();