true, "form_cc" => true, "ip" => true, "user_agent" => true ); // Process $action = isset($_POST["action"]) ? $_POST["action"] : ""; if (empty($action)) { // Send back the contact form HTML $output = "
"; echo $output; } else if ($action == "send") { // Send the email $name = isset($_POST["name"]) ? $_POST["name"] : ""; $email = isset($_POST["email"]) ? $_POST["email"] : ""; $subject = isset($_POST["subject"]) ? $_POST["subject"] : $subject; $message = isset($_POST["message"]) ? $_POST["message"] : ""; $cc = isset($_POST["cc"]) ? $_POST["cc"] : ""; $token = isset($_POST["token"]) ? $_POST["token"] : ""; // make sure the token matches if ($token === smcf_token($to)) { //smcf_send($name, $email, $subject, $message, $cc); echo "Your message was successfully sent."; } else { echo "Unfortunately, your message could not be verified."; } } function smcf_token($s) { return md5("smcf-" . $s . date("WY")); } exit; ?>