Support Confirmation

[insert_php]
if(isset($_POST[‘g-recaptcha-response’])){
$captcha=$_POST[‘g-recaptcha-response’];
}
if(!$captcha){
echo ‘

Please check the the captcha form.

‘;
exit;
}
$secretKey = “6Lel7gYUAAAAACD-SZ6h2MC3kbjENwE9IrpiHJ8Q”;
$ip = $_SERVER[‘REMOTE_ADDR’];
$response=file_get_contents(“https://www.google.com/recaptcha/api/siteverify?secret=”.$secretKey.”&response=”.$captcha.”&remoteip=”.$ip);
$responseKeys = json_decode($response,true);
if(intval($responseKeys[“success”]) !== 1) {
echo ‘

‘;
} else {

$link = new mysqli(“localhost”, “artesian_mkt2014”, “asp89115-“, “artesian_marketing”);

$firstname=mysqli_real_escape_string($link,$_POST[‘firstname’]);
$lastname=mysqli_real_escape_string($link,$_POST[‘lastname’]);
$email=mysqli_real_escape_string($link,$_POST[’email’]);
$phone=mysqli_real_escape_string($link,$_POST[‘phone’]);
$address=mysqli_real_escape_string($link,$_POST[‘address’]);
$city=mysqli_real_escape_string($link,$_POST[‘city’]);
$state=mysqli_real_escape_string($link,$_POST[‘state’]);
$zipcode=mysqli_real_escape_string($link,$_POST[‘zipcode’]);
$country=mysqli_real_escape_string($link,$_POST[‘country’]);
$comments=mysqli_real_escape_string($link,$_POST[‘comments’]);
$ip=$_POST[‘ip’];
$page=”Support Page”;
$category=”Artesian Spas”;

if(!$email == “” && (!strstr($email,”@”) || !strstr($email,”.”)))
{
echo “

Please go Back and enter a valid e-mail

\n”;
$badinput = “

Form was NOT submitted

\n”;
echo $badinput;
die (“Verification Error”);
}

if(empty($firstname) || empty($country) || empty($zipcode))

{
echo “

Please go Back and fill out Your Name, Zip Code and Country.

\n”;
die (“Verification Error “);
}

$result = mysqli_query($link, “INSERT INTO quote (firstname, lastname, email, phone, address, city, state, zipcode, country, comments, page1, ip, category) VALUES (‘$firstname’,’$lastname’, ‘$email’, ‘$phone’, ‘$address’, ‘$city’, ‘$state’, ‘$zipcode’, ‘$country’, ‘$comments’, ‘$page’, ‘$ip’, ‘$category’)”);

if($result){
echo (“”);
} else{
echo(”
Input data failed”);
}
mysqli_close($link);
}
[/insert_php]

Date:
[insert_php]
$todayis = date(“l, F j, Y”) ;
echo $todayis; [/insert_php]

Thank You, [insert_php]
$link = mysqli_connect(“localhost”, “artesian_mkt2014”, “asp89115-“, “artesian_marketing”);
$firstname=mysqli_real_escape_string($link,$_POST[‘firstname’]);
echo $firstname; [/insert_php]
for your interest! An Artesian Spas representative will be in contact with you shortly.

Your Message:
[insert_php]
$link = mysqli_connect(“localhost”, “artesian_mkt2014”, “asp89115-“, “artesian_marketing”);
$comments=mysqli_real_escape_string($link,$_POST[‘comments’]);
$comments = str_replace(“\r”, “”, $comments);
echo $comments;

[/insert_php]