Contact Vapour Blast
Golcar
Huddersfield
West Yorkshire
Hudersfield
Tel: 01484 646971
Mob: 0770 809 8571
Enquiries: info@vapourblast.co.uk
View Larger Map
If you would like to receive additional information please fill out the form below and click on the send button.
if (!isset($_POST['submitted'])) {
// Display form
?>
} else {
// validation of the form data
$error = '';
$pattern = '/^[a-zA-Z0-9\.\-\'_ ]+$/';
if (preg_match($pattern, $_POST['name']) == 0) {
$error .= 'name ';
}
$pattern = '/^[a-zA-Z0-9\.\-_]+@[a-zA-Z0-9\.\-_]+\.[a-zA-Z0-9\.\-_]+$/';
if (preg_match($pattern, $_POST['email']) == 0) {
$error .= 'email ';
}
$pattern = '/^[0-9 ]+$/';
if (preg_match($pattern, $_POST['phone']) == 0) {
$error .= 'phone ';
}
$pattern = '/^[a-zA-Z0-9\.\-\'_,@£!%() ]+$/';
if (preg_match($pattern, $_POST['message']) == 0) {
$error .= 'message ';
}
if ($error == '') {
// construct and send mail
$to = 'info@vapourblast.co.uk';
$subject = "[VaporBlast] Contact Form";
$name = $_POST['name'];
$email = $_POST['email'];
$phone = $_POST['phone'];
$message = $_POST['message'];
$body = "Name: " . $name . "\n" . "Email: " . $email . "\n" . "Phone: " . $phone . "\n" . "Message: " . $message ."\n";
$status = mail($to, $subject, $body);
// give user confirmation
if ($status == 1) {
?>
Thank You
Your message has been sent to us.
Return to homepage
} else {
?>
Sorry
There has been a problem sending your message. Please try again later.
Return to homepage
}
} else {
// redisplay form with error messages
?>
Sorry, there is a problem with the information you entered. Please correct the fields highlighted below. Some special characters are not allowed.
}
}
?>