Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // set some variables
- $emailFrom = "info@email.com";
- $emailTo = "info@email.com";
- $subject = "240";
- $customer = $_POST['email'];
- // grab the data being passed from the method="post" in the HTML form
- // and hold it in a variable
- $first_name = Trim(stripslashes($_POST['first_name']));
- $last_name = Trim(stripslashes($_POST['last_name']));
- $position = Trim(stripslashes($_POST['position']));
- $company = Trim(stripslashes($_POST['company']));
- $email = Trim(stripslashes($_POST['email']));
- $school = Trim(stripslashes($_POST['school']));
- $class = Trim(stripslashes($_POST['class']));
- $address = Trim(stripslashes($_POST['address']));
- $city = Trim(stripslashes($_POST['city']));
- $states = Trim(stripslashes($_POST['states']));
- $zip = Trim(stripslashes($_POST['zip']));
- $phone = Trim(stripslashes($_POST['phone']));
- // THAT'S IT - if you entered the data properly above, this script
- // will simply work. Do not edit anything below here.
- // prepare email body text
- $body = ""; //initialize
- $body .= "First Name: ";
- $body .= $first_name;
- $body .= "\n";
- $body .= "Last Name: ";
- $body .= $last_name;
- $body .= "\n";
- $body .= "Position: ";
- $body .= $position;
- $body .= "\n";
- $body .= "Company: ";
- $body .= $company;
- $body .= "\n";
- $body .= "Email: ";
- $body .= $email;
- $body .= "\n\n";
- $body .= "School: ";
- $body .= $school;
- $body .= "\n";
- $body .= "Class: ";
- $body .= $class;
- $body .= "\n\n";
- $body .= "Address: ";
- $body .= $address;
- $body .= "\n";
- $body .= "City: ";
- $body .= $city;
- $body .= "\n";
- $body .= "State: ";
- $body .= $states;
- $body .= "\n";
- $body .= "Zip: ";
- $body .= $zip;
- $body .= "\n";
- $body .= "First Name: ";
- $body .= $first_name;
- $body .= "\n";
- $body .= "Telephone: ";
- $body .= $phone;
- $body .= "\n\n";
- // send email
- mail($emailTo, $subject, $body, "From: <$emailFrom>");
- //mail($customer, $subject, $body2,
- // send the user to the thank you webpage
- header("Location: 240.html");
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement