PhpRiot
Follow phpriot on Twitter
Sponsored Link

Listing 2731

Submitted by Beth Hillard, 11 March 2010
<?php session_start (); include_once'securimage/securimage.php'; $captcha_error = false; $valid = false; $securimage = new Securimage (); $valid = $securimage->check ($_POST['captcha_code']); if ($valid == false) { $captcha_error = true; } if ($captcha_error == false) { if (isset ($_POST['btnSubmit'])) { $_SESSION['emailed'] = "1"; $subject = 'Contact Us Form Submission'; $body = 'A form has been submitted via your Contact Us Page:'; foreach ($_POST as $key => $val) { if ( substr ($key, strlen ($key)-5,5)>8999) { $key = substr ($key,0, strlen ($key)-5); } if (! ($key == "captcha_code" || $key == "btnSubmit")) { $body = $body . "<br />$key:$val"; } } $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $headers .= 'To: kalypsobayvacationrentals@verizon.net' . "\r\n"; $headers .= 'From: New Form Submitted <kalypsobayvacationrentals@verizon.net>' . "\r\n"; mail ($to,$subject,$body,$headers); header ("Location: www.kalypsobayvacationrentals.com"); } } ?>
Submit a Follow Up