"info@happycampers.co.nz"
'; echo ''.$tfsc_array['subject'].'
'; echo ''.$tfsc_array['contents'].'
'; echo ''.$tfsc_array['headers'].'
'; } else { // send e-mail using array entries mail( "info@happycampers.co.nz", $tfsc_array['subject'], $tfsc_array['contents'], $tfsc_array['headers'] ); } } $errors = ""; $name = ""; $email = ""; $email2 = ""; $message = ""; if (isset($_POST['submit'])) { // error if any fields aren't filled in if(!isset($_POST['name']) || !isset($_POST['email']) || !isset($_POST['email2']) || !isset($_POST['message'])) { $errors = "Please fill out all fields. Press the back button to go back.
"; } if($_POST['email'] != $_POST['email2']) { $errors = "Your e-mail addresses do not match. Please press the back button and check they are correct.
"; } if(isset($_POST['name'])) $name = $_POST['name']; if(isset($_POST['email'])) $email = $_POST['email']; if(isset($_POST['email2'])) $email2 = $_POST['email2']; if(isset($_POST['message'])) $message = $_POST['message']; // validate e-mail address if(!preg_match("/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*$/i", $_POST['email'])) { // validation passed, send email $name = $_POST['name']; $email = $_POST['email']; $message = $_POST['message']; $userEmail['to'] = "info@kiwicampers.co.nz"; $userEmail['headers'] = "From: ".$email; $userEmail['subject'] = "INQUIRY FORM (Happy Campers) from ".$name; $userEmail['contents'] = $message; $userEmail['contents'] = html_entity_decode($userEmail['contents']); sendEmail($userEmail); header( "Location: enquiry_thanks.html" ); exit; } else { // invalid email address $errors = "We have detected that the e-mail address entered is invalid. Please press back and check this, otherwise send e-mail using the address noted on the contact details page."; } } ?>
Click to Start Slideshow
Contact Us at Happy Campers
Christchurch Depot ( Head Office )Contact us via the Christchurch Depot. ( See the location of this depot on a map )
To make an enquiry about our services, or anything else you might want to know, Enquiry Form |
||||