Survey
[insert_php]
if ($_GET[“source”]) {
$fromName = ‘Dental Survey’;
$subject = ‘Page visit’;
/* Mail Address */
$toAddr = ‘surveyresponses@c22solutions.com’;
$fromAddr = ‘survey@c22solutions.com’;
/* End Mail Address */
date_default_timezone_set(‘America/Los_Angeles’);
/* Mail Body */
$msg = ‘
Survey visited via: ‘ . htmlspecialchars($_GET[“source”]) . ‘
Timestamp: ‘ . date(“F j, Y, g:i a”) . ‘
IP: ‘ . $_SERVER[‘REMOTE_ADDR’] . ‘
‘;
$msg = wordwrap($msg, 70);
/* End Mail Body */
/* Mail Headers Setup */
$headers = array();
$headers[] = “MIME-Version: 1.0”;
$headers[] = “Content-type: text/html; charset=utf-8”;
$headers[] = “From: “.$fromName.” <".$fromAddr.">“;
/* End Mail Headers Setup */
mail($toAddr, $subject, $msg, implode(“\r\n”, $headers));
}
[/insert_php]