elendilthetall

Untitled

Nov 4th, 2013
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.06 KB | None | 0 0
  1. <?php
  2.     // Set properties
  3.     $to     = "[email protected]";  // Enter the email address to send email to.
  4.     $subject    = "Booking Form Submission";            // Enter a subject for your email.
  5.    
  6.     // Set the web address to forward the user to when the mail is successfully sent.
  7.     $url        = "success.html";
  8.    
  9.     // Send the email, you don't need to change anything below this line.
  10.     $sent = mail($to, $subject, $_POST["message"], "From: " . $_POST["email"], "-f" . $_POST["email"], "Telephone:" . $_POST["tel"], "Payment Method:". $_POST["payment"], "Payment Address:" . $_POST["address"], "Purchase Order Number:" . $_POST["pono"], "No. of Delegates:" . $_POST["delno"], "Residential?:" . $_POST["residential"], "Exam?:" . $_POST["exam"], "Total Cost:" . $_POST["total_cost"]);
  11.  
  12.     // See if mail was sent
  13.     if($sent) {
  14.         // Email was sent successfully. Note that all we can see is that the mail was sent
  15.         // from the server, but we cannot determine if it arrived at it's destination.
  16.         header("Location: " . $url);
  17.     } else {
  18.         // Mail was not sent
  19.         die("Your email has not been sent.");
  20.     }
  21. ?>
Advertisement
Add Comment
Please, Sign In to add comment