aboutsummaryrefslogtreecommitdiff
path: root/controllers/mail.controller.php
diff options
context:
space:
mode:
Diffstat (limited to 'controllers/mail.controller.php')
-rw-r--r--controllers/mail.controller.php34
1 files changed, 0 insertions, 34 deletions
diff --git a/controllers/mail.controller.php b/controllers/mail.controller.php
deleted file mode 100644
index 262f999..0000000
--- a/controllers/mail.controller.php
+++ /dev/null
@@ -1,34 +0,0 @@
-<?php
-
-$submit = new Form();
-
-$submit->name = $_POST['26471'] ?? null;
-$submit->email = $_POST['26472'] ?? null;
-$submit->message = $_POST['26478'] ?? null;
-
-$spam = $_POST['contact'] ?? false;
-
-if ((bool) $spam == true) {
- http_response_code(403);
- error_log('Contact Form Spam: Error 403');
- return;
-}
-
-if ((bool) empty($submit->name) == true
- || (bool) empty($submit->email) == true
- || (bool) empty($submit->message) == true
-) {
- header('Location: /contact');
- return;
-} else {
- include '../views/sent.view.php';
- fastcgi_finish_request();
- $contact['database']->insert(
- 'contactform', [
- 'name' => $submit->name,
- 'email' => $submit->email,
- 'message' => $submit->message,
- ]
- );
- sendMail($submit->name, $submit->email, $submit->message);
-}