From 375a0b6dfa2ad3bc528b4377d4b456b5b765c2a4 Mon Sep 17 00:00:00 2001
From: Eric Rasmussen <erasmussen2@unl.edu>
Date: Wed, 27 Apr 2011 18:43:37 +0000
Subject: [PATCH] Put the submissions into a database

---
 www/police/terrex11/index.php | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/www/police/terrex11/index.php b/www/police/terrex11/index.php
index 6aeea3f..3879080 100644
--- a/www/police/terrex11/index.php
+++ b/www/police/terrex11/index.php
@@ -12,8 +12,14 @@ if (!empty($_POST)) {
     }
 
     if (empty($error_msg)) {
-        $mailer = new UNL_WDN_Emailer_Main();
+        // Put the stuff in the database
+        $name = mysql_real_escape_string($_POST['name']);
+        $email = mysql_real_escape_string($_POST['email']);
+        $query = "INSERT INTO registration (name,email) VALUES ('{$name}','{$email}')";
+        $result = mysql_query($query);
+        mysql_close($con);
 
+        $mailer = new UNL_WDN_Emailer_Main();
         $body = '<h3>Thank you for your interest in volunteering for the May 11th Statewide Emergency Drill.</h3>';
         $body .= '
                 <ul>
@@ -41,7 +47,7 @@ if (!empty($_POST)) {
         $mailer->to_address   = $_POST['email'];
         $mailer->from_address = $sendFromEmail;
         $mailer->subject      = $emailSubject;
-        $mailer->send();
+        //$mailer->send();
 /*
         // Setup email for UNL staff recipients
         $mailer->html_body    = $body;
-- 
GitLab