diff options
author | Thedro Neely <thedroneely@gmail.com> | 2018-12-27 17:18:30 -0500 |
---|---|---|
committer | Thedro Neely <thedroneely@gmail.com> | 2018-12-27 17:18:30 -0500 |
commit | 6152b7394a1ff2211a79dc3521593f3b7deabb6b (patch) | |
tree | 60f2b4c0d41f8aa616c3380f63366ce30c70e6b6 /app | |
parent | 0c862307dd20a7ecb7a72e3f262fe9ac38455ca0 (diff) | |
download | thedroneely.com-6152b7394a1ff2211a79dc3521593f3b7deabb6b.tar.gz thedroneely.com-6152b7394a1ff2211a79dc3521593f3b7deabb6b.tar.bz2 thedroneely.com-6152b7394a1ff2211a79dc3521593f3b7deabb6b.zip |
app/controllers/mail: Let mail controller commit to database
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/mail.controller.php | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/app/controllers/mail.controller.php b/app/controllers/mail.controller.php index b71934b..93260c8 100644 --- a/app/controllers/mail.controller.php +++ b/app/controllers/mail.controller.php @@ -9,23 +9,23 @@ $form = new Form( $message = $_POST['26478'] ); -// $contact['database']->insert( -// 'contactform', [ -// 'name' => $form->name, -// 'email' => $form->email, -// 'message' => $form->message, -// ] -// ); - $validEmail = PHPMailer::validateAddress($email, 'auto'); if ($validEmail === false ) { $mailError = 'Invalid email' . "\r" . '<em>'. $email . '</em>'; include '../app/views/mail-error.view.php'; + return; } require '../app/views/mail-sent.view.php'; fastcgi_finish_request(); - $form->isSubmit(); + +$contact['database']->insert( + 'contactform', [ + 'name' => $form->name, + 'email' => $form->email, + 'message' => $form->message, + ] +); |