From 703eab984333933baf13bc3188185e95f95d7cde Mon Sep 17 00:00:00 2001 From: Patrick McGuire Date: Wed, 22 Jul 2020 09:11:57 -0400 Subject: [PATCH] Update enter_information.php --- enter_information.php | 42 +++++++++++++++++++++++++----------------- 1 file changed, 25 insertions(+), 17 deletions(-) diff --git a/enter_information.php b/enter_information.php index 58ca9b0..2e3fdd9 100644 --- a/enter_information.php +++ b/enter_information.php @@ -11,12 +11,23 @@ if (isset($_POST['web_first_name'])){ } } $DOB=''; - if (isset($_POST['DOB'])){ + // old DOB form + if (isset($_POST['DOB'])){ if ($_POST['DOB'] != ''){ $DOB = $_POST['DOB']; setcookie("pDOB", $DOB); } } + // new DOB form + if (isset($_POST['web_dob_day'])){ + if ($_POST['web_dob_day'] != ''){ + $DOB = intval($_POST['web_dob_year']).'-'.intval($_POST['web_dob_month']).'-'.intval($_POST['web_dob_day']); + setcookie("pDOB", $DOB); + setcookie("web_dob_month", $_POST['web_dob_month']); + setcookie("web_dob_year", $_POST['web_dob_year']); + setcookie("web_dob_day", $_POST['web_dob_day']); + } + } $web_first_name=''; if (isset($_POST['web_first_name'])){ if ($_POST['web_first_name'] != ''){ @@ -37,14 +48,14 @@ if (isset($_POST['web_first_name'])){ $web_house_number=''; if (isset($_POST['web_house_number'])){ if ($_POST['web_house_number'] != ''){ - $web_house_number = $_POST['web_house_number']; + $web_house_number = intval($_POST['web_house_number']); setcookie("web_house_number", $web_house_number); } } $web_zip_code=''; if (isset($_POST['web_zip_code'])){ if ($_POST['web_zip_code'] != ''){ - $web_zip_code = $_POST['web_zip_code']; + $web_zip_code = substr(intval($_POST['web_zip_code']),0,5); setcookie("web_zip_code", $web_zip_code); } } @@ -92,23 +103,20 @@ slack_general('Enter Information ('.$_COOKIE['invite'].')','md-petition');
-

Date of Birth

-
-
- -
- -
+
+
+
+
+

Date of Birth Format

+

MM

+

DD

+

YYYY

+
+

Phone Number**

@@ -151,7 +159,7 @@ slack_general('Enter Information ('.$_COOKIE['invite'].')','md-petition');
-
* E-Mail is not required, and will only be used internally, if we need to reach you. It will never sold or given out.
+
* E-Mail is not required, it will only be used internally to reach you. It will never sold or given out.
** PHONE NUMBER IS REQUIRED BY STATE OF MARYLAND. WE WILL NEVER USE YOUR PHONE NUMBER - NEVER CALL - NEVER FOR TEXT MESSAGES.
-- 2.20.1