[insert_php]
$addr = “diana@karate-family.com”;
//$addr = “chrismizelle@cox.net”;
$yourName = $_POST[“yourName”];
$emailAddr= $_POST[“emailAddr”];
$phoneNumber= $_POST[“phoneNumber”];
$numOfPeople= $_POST[“numOfPeople”];
$cost = 0;
$numOfPeopleInt = intval($numOfPeople);
switch ($numOfPeopleInt)
{
case 0:
$cost = 0;
break;
case 1:
$cost = 29;
break;
case 2:
$cost = 49;
break;
case 3:
$cost = 64;
break;
case 4:
$cost = 79;
break;
case 5:
$cost = 94;
break;
default:
$cost = 0;
break;
}
$formattedCost = ‘$’ . $cost;
echo “Thank You for registering for the Halloween Sleepover!
“;
echo “We have you down for ” . $numOfPeopleInt . ” attendees. The total cost is ” . $formattedCost . “.
“;
echo “
\n”;
$message = “”;
$subj = “Halloween Sleepover Signup Information submitted by $yourName “;
$message .= “Submitted by: $yourName\n”;
$message .= “Email Address: $emailAddr\n”;
$message .= “Phone: $phoneNumber\n”;
$message .= “Number of People: $numOfPeople\n”;
$message .= “Total Cost: ” . chr(36) . $cost . “\n”;
$extra = “From: noreply@karate-family.com\r\nReply-To: $email\r\n”;
if ($addr != “” && $yourName != “”)
{
mail ($addr, $subj, $message, $extra);
mail (“chrismizelle@cox.net”, $subj, $message, $extra);
}
[/insert_php]