include('php/dbc.php'); // Registration Post Vars $r_event_id = $_POST['event_id']; $first_name = $_POST['first_name']; $last_name = $_POST['last_name']; $email_address = $_POST['email_address']; $phone = $_POST['phone']; $san = $_POST['san']; $sms_optin = $_POST['sms_optin']; $carrier = $_POST['carrier']; $alert = ""; // queries $add_attendee = "INSERT INTO users(type,first_name,last_name,email_address,phone,san,sms_optin,carrier,event_id)VALUES('attendee','$first_name','$last_name','$email_address','$phone','$san','$sms_optin','$carrier','$r_event_id');"; $get_registered = "SELECT * FROM events WHERE event_id = '$r_event_id'"; // conditionals if(isset($r_event_id)){ $conn->query($add_attendee); $r = $conn->query($get_registered); while($row = $r->fetch_assoc()) { $title = $row['title']; $address = $row['address']; $city = $row['city']; $state = $row['state']; $zip = $row['zip']; $convertDate = DateTime::createFromFormat('Y-m-d', $row['date']); $date = $convertDate->format('F d, Y'); $convertTime = DateTime::createFromFormat('H:i:s', $row['time']); $time = $convertTime->format('g:i a'); $timezone = $row['timezone']; $registered = $row['registered']; $add_one = $registered+1; $update_registered = "UPDATE events SET registered = '$add_one' WHERE event_id = '$r_event_id'"; $conn->query($update_registered); } //define email message $body = "
Thank you for registering!
|
The 2019 Annual Enrollment Period is days away.
Whether it’s your first AEP or you have years of experience, it’s always a good idea to start the season off on the right foot.