Advertisement
Guest User

Untitled

a guest
Sep 30th, 2016
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.97 KB | None | 0 0
  1. <?php
  2.  
  3. // set some variables
  4. $emailFrom = "info@email.com";
  5. $emailTo = "info@email.com";
  6. $subject = "240";
  7. $customer = $_POST['email'];
  8.  
  9. // grab the data being passed from the method="post" in the HTML form
  10. // and hold it in a variable
  11. $first_name = Trim(stripslashes($_POST['first_name']));
  12. $last_name = Trim(stripslashes($_POST['last_name']));
  13. $position = Trim(stripslashes($_POST['position']));
  14. $company = Trim(stripslashes($_POST['company']));
  15. $email = Trim(stripslashes($_POST['email']));
  16.  
  17. $school = Trim(stripslashes($_POST['school']));
  18. $class = Trim(stripslashes($_POST['class']));
  19.  
  20. $address = Trim(stripslashes($_POST['address']));
  21. $city = Trim(stripslashes($_POST['city']));
  22. $states = Trim(stripslashes($_POST['states']));
  23. $zip = Trim(stripslashes($_POST['zip']));
  24. $phone = Trim(stripslashes($_POST['phone']));
  25.  
  26. // THAT'S IT - if you entered the data properly above, this script
  27. // will simply work. Do not edit anything below here.
  28.  
  29. // prepare email body text
  30. $body = ""; //initialize
  31.  
  32. $body .= "First Name: ";
  33. $body .= $first_name;
  34. $body .= "\n";
  35.  
  36. $body .= "Last Name: ";
  37. $body .= $last_name;
  38. $body .= "\n";
  39.  
  40. $body .= "Position: ";
  41. $body .= $position;
  42. $body .= "\n";
  43.  
  44. $body .= "Company: ";
  45. $body .= $company;
  46. $body .= "\n";
  47.  
  48. $body .= "Email: ";
  49. $body .= $email;
  50. $body .= "\n\n";
  51.  
  52. $body .= "School: ";
  53. $body .= $school;
  54. $body .= "\n";
  55.  
  56. $body .= "Class: ";
  57. $body .= $class;
  58. $body .= "\n\n";
  59.  
  60. $body .= "Address: ";
  61. $body .= $address;
  62. $body .= "\n";
  63.  
  64. $body .= "City: ";
  65. $body .= $city;
  66. $body .= "\n";
  67.  
  68. $body .= "State: ";
  69. $body .= $states;
  70. $body .= "\n";
  71.  
  72. $body .= "Zip: ";
  73. $body .= $zip;
  74. $body .= "\n";
  75.  
  76. $body .= "First Name: ";
  77. $body .= $first_name;
  78. $body .= "\n";
  79.  
  80. $body .= "Telephone: ";
  81. $body .= $phone;
  82. $body .= "\n\n";
  83.  
  84.  
  85.  
  86. // send email
  87. mail($emailTo, $subject, $body, "From: <$emailFrom>");
  88. //mail($customer, $subject, $body2,
  89.  
  90.  
  91. // send the user to the thank you webpage
  92. header("Location: 240.html");
  93.  
  94. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement