Name and Email are required fields. "; } if(IsInjected($visitor_email)) { $errors .= "\n Bad email value!"; } if(empty($_SESSION['6_letters_code'] ) || strcasecmp($_SESSION['6_letters_code'], $_POST['6_letters_code']) != 0) { //Note: the captcha code is compared case insensitively. //if you want case sensitive match, update the check above to // strcmp() $errors .= "\n The captcha code does not match!"; } if(empty($errors)) { //send the email $to = $your_email; $subject="LOH Director HOG Contact Form"; $from = $webmaster; $ip = isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : ''; $body = "LOH Director, a visitor from the Gainesville HOG web site, $name, submitted the contact form.\n\n". "Name: $name\n\n". "Email: $visitor_email \n\n". "Phone: $phone \n\n". "Message: ". "$user_message\n\n". "Referrer: $referrer \n\n". "IP: $ip\n\n"; $headers = "From: $from \r\n"; $headers .= "Reply-To: $visitor_email \r\n"; //$headers .= "Cc: $webmaster \r\n"; mail($to, $subject, $body, $headers); header('Location: ./thank-you.html'); } } // Function to validate against any email injection attempts function IsInjected($str) { $injections = array('(\n+)', '(\r+)', '(\t+)', '(%0A+)', '(%0D+)', '(%08+)', '(%09+)' ); $inject = join('|', $injections); $inject = "/$inject/i"; if(preg_match($inject,$str)) { return true; } else { return false; } } if(IsInjected($visitor_email)) { echo "Bad email value!"; exit; } ?> <?php echo $LOHname; ?> - LOH Director - Gainesville H.O.G.


Officer Contact: , LOH

".nl2br($errors)."

"; } ?>
  • We respect your Privacy. Your information won't be shared.
  • All fields are required.

' />

captcha


Can't read the image? click here to refresh

 

 


Profile

LOH