File: //old_home_backup/busesatwork.co.uk/public_html/includes/contact-form.php
<?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 = "hello@busesatwork.co.uk";
$subject = "Enquiry From busesatwork.co.uk Website";
$mailheader = "From: $email \r\n";
//customer email variables
$customerheader = "From: noreply@busesatwork.co.uk \r\n";
$customermessage = "From: 'Buses at Work'\n";
$customercontent="From: 'Buses at Work' \n
Thank you $firstname for contacting Buses at Work, 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);
print "<meta http-equiv=\"refresh\" content=\"0;URL=contactthanks.php\">"; }
else {print "<meta http-equiv=\"refresh\" content=\"0;URL=contacterror.php\">";
}
?>