Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // Replace this with your own email address
- $siteOwnersEmail = 'thegamezbus@gmail.com';
- if($_POST) {
- $fullname = trim(stripslashes($_POST['contactfullname']));
- $childname = trim(stripslashes($_POST['contactchildname']));
- $groupage = trim(stripslashes($_POST['contactgroupage']));
- $numberchildren = trim(stripslashes($_POST['contactnumberchildren']));
- $partydate = trim(stripslashes($_POST['contactpartydate']));
- $partyhour = trim(stripslashes($_POST['contactpartyhour']));
- $email = trim(stripslashes($_POST['contactemail']));
- $phonenumber = trim(stripslashes($_POST['contactphonenumber']));
- $fulladdress = trim(stripslashes($_POST['contactfulladdress']));
- $package = trim(stripslashes($_POST['contactpackage']));
- $extras = trim(stripslashes($_POST['contactextras']));
- // Check Full Name
- if (strlen($fullname) < 2) {
- $error['fullname'] = "Please enter your full name.";
- }
- // Check Child Name
- if (strlen($childname) < 2) {
- $error['childname'] = "Please enter your child's name'.";
- }
- // Check Group Age
- if (strlen($groupage) < 2) {
- $error['groupage'] = "Please enter the age of the child.";
- }
- // Check Number Of Children
- if (strlen($numberchildren) < 1) {
- $error['numberchildren'] = "Please enter the number of expected children.";
- }
- // Check Date of Party
- if (strlen($partydate) < 1) {
- $error['partydate'] = "Please enter the date of the party.";
- }
- // Check Time of party
- if (strlen($partyhour) < 1) {
- $error['partyhour'] = "Please enter the time of the party.";
- }
- // Check Email
- if (!preg_match('/^[a-z0-9&\'\.\-_\+]+@[a-z0-9\-]+\.([a-z0-9\-]+\.)*+[a-z]{2}/is', $email)) {
- $error['email'] = "Please enter a valid email address.";
- }
- // Check Full Address
- if (strlen($fulladdress) < 1) {
- $error['fulladdress'] = "Please enter your full address.";
- }
- // Check Phone Number
- if (strlen($phonenumber) < 1) {
- $error['phonenumber'] = "Please enter your phone number."
- }
- // Check Package Required
- if (strlen($package) < 1) {
- $error['package'] = "Please enter the package required.";
- }
- // Subject
- if ($subject == '') { $subject = "Contact Form Submission"; }
- // Set Name
- $name = $fullname;
- // Set Message
- $message .= "Email from: " . $name . "<br />";
- $message .= "Child Name: " . $childname . "<br />";
- $message .= "Group Age: " . $groupage . "<br />";
- $message .= "Number Of Children: " . $numberchildren . "<br />";
- $message .= "Date Of Party: " . $partydate . "<br />";
- $message .= "Time Of Party: " . $partyhour . "<br />";
- $message .= "Email Address: " . $email . "<br />";
- $message .= "Phone Number: " . $phonenumber . "<br />";
- $message .= "Full Address: " . $fulladdress . "<br />";
- $message .= "Package Requirements: " . $package . "<br />";
- $message .= "Aditional Services: " . $extras . "<br />";
- $message .= "Message: <br />";
- $message .= "<br /> ----- <br /> This email was sent from the GamezBus site's contact form. <br />";
- // Set From: header
- $from = $name . " <" . $email . ">";
- // Email Headers
- $headers = "From: " . $from . "\r\n";
- $headers .= "Reply-To: ". $email . "\r\n";
- $headers .= "MIME-Version: 1.0\r\n";
- $headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
- if (!$error) {
- ini_set("sendmail_from", $siteOwnersEmail); // for windows server
- $mail = mail($siteOwnersEmail, $fullname, $email, $phonenumber, $fulladdress, $headers);
- if ($mail) { echo "OK"; }
- else { echo "Something went wrong. Please try again."; }
- } # end if - no validation error
- else {
- $response .= (isset($error['fullname'])) ? $error['fullname'] . "<br /> \n" : null;
- $response .= (isset($error['childname'])) ? $error['childname'] . "<br /> \n" : null;
- $response .= (isset($error['groupage'])) ? $error['groupage'] . "<br /> \n" : null;
- $response .= (isset($error['numberchildren'])) ? $error['numberchildren'] . "<br />" : null;
- $response .= (isset($error['partydate'])) ? $error['partydate'] . "<br /> \n" : null;
- $response .= (isset($error['partyhour'])) ? $error['partyhour'] . "<br /> \n" : null;
- $response .= (isset($error['email'])) ? $error['email'] . "<br /> \n" : null;
- $response .= (isset($error['phonenumber'])) ? $error['phonenumber'] . "<br />" : null;
- $response .= (isset($error['fulladdress'])) ? $error['fulladdress'] . "<br /> \n" : null;
- $response .= (isset($error['package'])) ? $error['package'] . "<br /> \n" : null;
- $response .= (isset($error['othercomments'])) ? $error['othercomments'] . "<br /> \n" : null;
- echo $response;
- } # end if - there was a validation error
- }
- ?><!DOCTYPE html>
- <!--[if lt IE 8 ]><html class="no-js ie ie7" lang="en"> <![endif]-->
- <!--[if IE 8 ]><html class="no-js ie ie8" lang="en"> <![endif]-->
- <!--[if IE 9 ]><html class="no-js ie ie9" lang="en"> <![endif]-->
- <!--[if (gte IE 9)|!(IE)]><!-->
- <html class="no-js" lang="en">
- <!--<![endif]-->
- <head>
- <!--- Basic Page Needs ================================================== -->
- <meta charset="utf-8">
- <title>GamezBus Booking Form</title>
- <meta name="description" content="games, bus, gamesbus, games bus, busgames, bus games, cre8, duncan, gamezbus">
- <meta name="author" content="Bulciu Vasile Andrei">
- <!-- Mobile Specific Metas ================================================== -->
- <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
- <!-- CSS ================================================== -->
- <link rel="stylesheet" href="css/base.css">
- <link rel="stylesheet" href="css/main.css">
- <link rel="stylesheet" href="css/media-queries.css">
- <!-- Script =================================================== -->
- <script src="js/modernizr.js"></script>
- <!-- Favicons =================================================== -->
- <link rel="shortcut icon" href="favicon.png" >
- </head>
- <body class="homepage">
- <div id="preloader">
- <div id="status">
- <img src="images/loader.gif" height="60" width="60" alt="">
- <div class="loader">
- Loading...
- </div>
- </div>
- </div>
- <!-- About Section ================================================== -->
- <section id="about">
- <div class="row section-head">
- <div class="twelve columns">
- <h1>Booking Form<span>.</span></h1>
- <hr />
- <h2><b>The Gamez Bus</b></h2>
- <h3><b>Cre8 Solutions Ltd, 181 Forest Road, Fairlop, Essex, IG6 3HZ</b></h3>
- <hr />
- <br />
- <p>
- Please also note that apart from the GamezBus, we offer the following aditional services:
- </p>
- <p>
- Mega gaming Party bags - £10 per child
- </p>
- <p>
- Cold drinks package £2 per child
- </p>
- <p>
- Sweets, crisps and drinks package £10 per child
- </p>
- <p>
- Fruit and healthy snack packs £10 per child
- </p>
- <p>
- Adult refreshments including coffee, tea etc. served on day at additional cost
- </p>
- <p>
- If any aditional services are required, please mention them in the "Other extras" box on the order form
- </p>
- <br />
- <p>
- Games Required: Please specify any games required by children, We carry a full range of the latest games on-board however, we prefer to be told of any must have titles.
- </p>
- <br />
- <h1>Complete the form below and we will get back to you as soon as possible. Thank you</h1>
- </div>
- </div>
- <!-- About Section ================================================== -->
- <!-- Form Section ================================================== -->
- <div class="row form-section">
- <div id="order-form" class="twelve columns">
- <form name="orderForm" id="orderForm" method="post" action="">
- <fieldset>
- <div class="row">
- <div class="six columns mob-whole">
- <label for="contactfullname">Full Name<span class="required">*</span></label>
- <input name="contactfullname" type="text" id="contactfullname" placeholder="Full Name" value="" />
- </div>
- <div class="six columns mob-whole">
- <label for="contactchilname">Child Name<span class="required">*</span></label>
- <input name="contactchilname" type="text" id="contactchilname" placeholder="Child Name" value="" />
- </div>
- </div>
- <div class="row">
- <div class="six columns mob-whole">
- <label for="contactgroupage">Group Age<span class="required">*</span></label>
- <input name="contactgroupage" type="text" id="contactgroupage" placeholder="Group Age" value="" />
- </div>
- <div class="six columns mob-whole">
- <label for="contactnumberchildren">Number Of Children<span class="required">*</span></label>
- <input name="contactnumberchildren" type="text" id="contactnumberchildren" placeholder="Number of children" value="" />
- </div>
- </div>
- <div class="row">
- <div class="six columns mob-whole">
- <label for="contactpartydate">Date of Party<span class="required">*</span></label>
- <input name="contactpartydate" type="text" id="contactpartydate" placeholder="Date of party" value="" />
- </div>
- <div class="six columns mob-whole">
- <label for="contactpartyhour">Time of party<span class="required">*</span></label>
- <input name="contactpartyhour" type="text" id="contactpartyhour" placeholder="Time of Party" value="" />
- </div>
- </div>
- <div class="row">
- <div class="six columns mob-whole">
- <label for="contactemail">Email Address<span class="required">*</span></label>
- <input name="contactemail" type="text" id="contactemail" placeholder="Email" value="" />
- </div>
- <div class="six columns mob-whole">
- <label for="contactphonenumber">Phone Number<span class="required">*</span></label>
- <input name="contactphonenumber" type="text" id="contactphonenumber" placeholder="Number" value="" />
- </div>
- </div>
- <div class="row">
- <div class="six columns mob-whole">
- <label for="contactfulladdress">Full Address<span class="required">*</span></label>
- <textarea name="contactfulladdress" id="contactfulladdress" placeholder="Full Address" rows="1" cols="50" ></textarea>
- </div>
- </div>
- <div class="row">
- <div class="six columns mob-whole">
- <label for="contactpackage">Package Required<span class="required">*</span></label>
- <textarea name="contactpackage" id="contactpackage" placeholder="Briefly explain what your booking would contain." rows="10" cols="50" ></textarea>
- </div>
- <div class="six columns mob-whole">
- <label for="contactextras">Other Extras</label>
- <textarea name="contactextras" id="contactextras" placeholder="Please feel free to add any optional extras here." rows="10" cols="50" ></textarea>
- </div>
- </div>
- <hr />
- <div>
- <button class="submit full-width">
- Send Message
- </button>
- <div id="image-loader">
- <img src="images/loader.gif" alt="" />
- </div>
- </div>
- </fieldset>
- </form>
- <!-- /orderForm -->
- <!-- message box -->
- <div id="message-warning">
- </div>
- <div id="message-success">
- <i class="fa fa-check"></i>Your message was sent, thank you!
- <br />
- </div>
- </div>
- <!-- /order-form -->
- </div>
- <!-- /form-section -->
- <!-- /Form Section ================================================== -->
- <!-- Footer ================================================== -->
- <footer>
- <div class="row">
- <div class="six columns tab-whole right-cols">
- <p class="homepage">
- <a href="index.html">Back To The Homepage</a>
- </p>
- </div>
- <!-- /row -->
- <div class="row">
- <div class="six columns tab-whole right-cols">
- <p class="copyright">
- © Copyright 2015 <a href="http://www.facebook.com/gamezbus">Gamezbus</a>. Design by <a href="http://www.facebook.com/andreipath">Bulciu Vasile Andrei.</a>
- </p>
- </div>
- <!-- /row -->
- </footer>
- <!-- /footer -->
- <!-- Java Script ================================================== -->
- <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
- <script>
- window.jQuery || document.write('<script src="js/jquery-1.10.2.min.js"><\/script>')
- </script>
- <script type="text/javascript" src="js/jquery-migrate-1.2.1.min.js"></script>
- <script src="js/jquery.flexslider.js"></script>
- <script src="js/jquery.fittext.js"></script>
- <script src="js/backstretch.js"></script>
- <script src="js/waypoints.js"></script>
- <script src="js/main.js"></script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement