define(array("page" => "tell-a-friend.htm")); if(isset($_POST['Send']) && $_POST['Send']) { if (strlen(trim($_POST['femail'])) <= 0) { $tpl->assign("S_MESSAGE", "Please, fill in the field \"Friend Email\"."); foreach($_POST as $k => $v) { $tpl->assign(strtoupper($k), $v); } } else { @mail($_POST['femail'], "Cool site, check it", $_POST["message"], "From: " . $_POST['name'] . " <" . $_POST['email'] . ">"); $tpl->assign("S_MESSAGE", "Your message was successfully sent!"); } } $tpl->parse($result, "page"); $tpl->FastPrint($result); include ("footer.php"); ?>