Advertisement
Guest User

Untitled

a guest
Dec 22nd, 2014
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.36 KB | None | 0 0
  1. <form name="OrderForm" action="Form.php" method="get" >
  2. <div class="Form-Title">First Name:</div>
  3. <input class="Box-Input" type="text" name="FirstName" maxlength="20">
  4. <br>
  5. <div class="Form-Title">Last Name:</div>
  6. <input class="Box-Input" type="text" name="LastName" maxlength="20">
  7. <br>
  8. <br>
  9. <div class="Form-Title">Contact Number:</div>
  10. <input class="Box-Input" pattern="[0-9.]+" type="text" name="ContactNo" maxlength="11">
  11. <br>
  12. <div class="Form-Title">Email Address:</div>
  13. <input class="Box-Input" name="Email" type="text" id="Email" maxlength="50">
  14. <br>
  15. <br>
  16. <div class="Form-Title">Date/Time:</div>
  17. <input class="DateTime-Input" name="Date" type=Date min=2014-12-11>
  18. <input class="DateTime-Input" name="Time" type=Time min=9:00 max=21:00>
  19. <br>
  20. <br>
  21. <input class="SRButtons" type="submit" name="SubmitForm" value="Submit" onclick="ValidateFields()">
  22. <br>
  23. </form>
  24.  
  25. <html>
  26. <body>
  27.  
  28. <?php
  29. if(isset($_GET['SubmitForm'])){
  30. $To = "rajan2615@hotmail.co.uk";
  31. $From = $_GET['Email'];
  32. $First_Name = $_GET['FirstName'];
  33. $Last_Name = $_GET['LastName'];
  34. $Subject = "Table Booking";
  35. $Subject2 = "Table Booking Confirmation";
  36. $Message = $First_Name . " " . $Last_Name . " Wrote the Following:" . "nn" . $_GET['We Would like to Book the Current Table, my Detail and the Booking Details are in this email too.'];
  37. $Message2 = "Here is a Copy of Your Message " . $first_name . "nn" . $_GET['We Would like to Book the Current Table, my Detail and the Booking Details are in this email too.'];
  38. $Headers = "From:" . $From;
  39. $Headers2 = "To:" . $To;
  40. mail($To,$Subject,$Message,$Headers);
  41. mail($From,$Subject2,$Message2,$Headers2);
  42. echo "Mail Sent. Thank you " . $First_Name . ", We Will Contact You Shortly.";
  43. }
  44. ?>
  45.  
  46. Thank You: <?php echo $_GET ["FirstName"]; ?><br>
  47. Your Table is Booked for: <?php echo $_GET ["Date"]; ?><br>
  48. At: <?php echo $_GET ["Time"]; ?><br>
  49. Confirmation is Sent To: <?php echo $_GET ["Email"]; ?>
  50.  
  51. </body>
  52. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement