Girl Scout Registration Submitted

[insert_php]

require_once $_SERVER[‘DOCUMENT_ROOT’] . “/sysadmin/db.php”;
require_once $_SERVER[‘DOCUMENT_ROOT’] . “/sysadmin/common.php”;
require_once $_SERVER[‘DOCUMENT_ROOT’] . “/sysadmin/service/EventService.php”;
require_once $_SERVER[‘DOCUMENT_ROOT’] . “/sysadmin/model/Event.php”;
require_once $_SERVER[‘DOCUMENT_ROOT’] . “/sysadmin/model/EventRegistrant.php”;

$eventService = new EventService();
$eventRegistrant = new EventRegistrant();

//$regEmailAddr = “diana@karate-family.com”;
$regEmailAddr = “chrismizelle@cox.net”;

$eid = $_POST[“eid”];
$yourName = $_POST[“yourName”];
$parentName = $_POST[“parentName”];
$address = $_POST[“address”];
$city = $_POST[“city”];
$state = $_POST[“state”];
$zip = $_POST[“zip”];
$dob = $_POST[“dob”];
$age = $_POST[“age”];
$email = $_POST[“email”];
$phone = $_POST[“phone”];

$eventRegistrant->setEventId($eid);
$eventRegistrant->setName($yourName);
$eventRegistrant->setParentName($parentName);
$eventRegistrant->setAddress($address);
$eventRegistrant->setCity($city);
$eventRegistrant->setState($state);
$eventRegistrant->setZip($zip);
//$eventRegistrant->setDob($dob);
$eventRegistrant->setAge($age);
$eventRegistrant->setEmail($email);
$eventRegistrant->setPhone($phone);

$event = $eventService->getEventById($eid);
$t = $event->getTitle();

echo “

You have scccessfully registered for ” . $event->getTitle() . ” – ” . $event->getDateTime() . “.

“;

echo “

\n”;
echo “The following information was submitted:

\n”;
echo $eventRegistrant->toString();
echo “
If you have any questions, please call us at (757)483-0195.”;
echo “

\n”;

//echo “INFO—
“;
//echo $eventRegistrant->toString();

$newId = $eventService->addRec($eventRegistrant);

//echo “NEW ID = ” . $newId . “
“;

$message = “”;
$message = “You have scccessfully registered for ” . $event->getTitle() . ” – ” . $event->getDateTime() . “\n\n”;
$message .= $eventRegistrant->toString(“\n”);

$adminMessage = “”;
$adminmessage = “Registration for ” . $event->getTitle() . ” – ” . $event->getDateTime() . “\n\n”;
$adminMessage .= $eventRegistrant->toString(“\n”);

$subj = $event->getTitle() . ” registration submitted for ” . $eventRegistrant->getName();

$extra = “From: noreply@karate-family.com\r\nReply-To: $email\r\n”;

mail (“chrismizelle@cox.net”, $subj, $message, $extra);

mail ($eventRegistrant->getEmail(), $subj, $adminMessage , $extra);

[/insert_php]

Top