$id = $_GET['id'];
$error="";
if(isset($_POST["submit"]))
{
session_start();
require_once('scripts/recaptchalib.php');
//captcha check
$privatekey = "6LfN1skSAAAAAGul36VRaWDH-OxTKPQnwUYLzi8I";
$resp = recaptcha_check_answer ($privatekey, $_SERVER["REMOTE_ADDR"], $_POST["recaptcha_challenge_field"], $_POST["recaptcha_response_field"]);
$ok = 1;
if (!$resp->is_valid)
{
// What happens when the CAPTCHA was entered incorrectly
$error= "The reCAPTCHA wasn't entered correctly. Try it again.";
$ok = 0;
}
$expire=time()+60*60*24;
/*
if ($ok == 1)
{
if (isset($_COOKIE["repeat"]))
{
if($_COOKIE["repeat"]==3)
{
$error= "You have to wait 24 hours in order to be able to use the form again.";
$ok = 0;
}
else
{
setcookie("repeat", $_COOKIE["repeat"]+1, $expire);
$ok = 1;
}
}
else
{
setcookie("repeat", "1", $expire);
}
}
*/
$fromt = strtotime($_POST['fromtime']);
$tot = strtotime($_POST['totime']);
if ($ok == 1)
{
//if the code is correct
include('scripts/class.phpmailer.php');
//collect data
$name = $_POST['name'];
$email = $_POST['email'];
$phone = $_POST['phone'];
$message = $_POST['message'];
$id = $_POST['id'];
//send the email
$mail = new PHPMailer();
$mail->From = $email;
$mail->FromName = $name;
$mail->Subject = "HIN Contact Message";
$mail->MsgHTML("
Name: $name
Email: $email
Phone: $phone
Message: $message
");
$mail->AddAddress("info@huntinginfonetwork.com", "HIN Contact Message");
if ($mail->Send()==1)
header('location: thanks.php');
else
echo "An internal error has occured!";
}
}
?>
|
Welcome
HuntingInfo Network is a collection of hunting related websites filled with useful info, reviews, videos, images and many more. We try to be a starting place for any amateur hunter out there. Feel free to browse our websites in the right content area. |
If you have any questions or comments feel free to contact us at . |