File: /home/abiaf.co.uk/public_html/includes/include.txt
<?php
$firstname = $_POST['firstname'];
$surname = $_POST['surname'];
$email = $_POST['email'];
$message = $_POST['message'];
$call = $_POST['call'];
$phone = $_POST['phone'];
$count = $_POST['count'];
//business email variables
$formcontent="From: $dropdown1 $firstname $surname \n
Email: $email \n
Message: $message \n
Phone No: $phone";
$recipient = "zoe.allen@vanillacircus.co.uk";
$subject = "Enquiry From "__websitename__" Website";
$mailheader = "From: $email \r\n";
//customer email variables
$customerheader = "From: noreply@"__companyname__".co.uk \r\n";
$customermessage = "From: '"__companyname__"'\n";
$customercontent="From: '"__companyname__"' \n
Thank you $firstname for contacting "__companyname__", an adviser will get back to you shortly \n
Your Message: $message";
//if captcha is answered correctly, send emails
if (isset($_POST['count']))
if ($_POST['count'] == '5') {
mail ($recipient, $subject, $formcontent, $mailheader);
mail($email, $customermessage, $customercontent, $customerheader);
echo "Thank you $firstname"; }
else {echo "Sorry, you have answered the question incorrectly, please go back and try again";
}
?>