Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?
- $email = $_POST['email'];
- $questions = $_POST['myQuestions'];
- // subject
- $subject = 'Request for Information';
- // HTML message
- $message = '
- <html>
- <head>
- <title>' . $email . ' sent you a message.</title>
- </head>
- <body>
- <p style="font-size: 19px;">' . $email. '</p>
- <p style="font-size: 19px;"> '. $questions .'</p>
- </body>
- </html>
- ';
- // To send HTML mail, the Content-type header must be set
- $headers = 'MIME-Version: 1.0' . "\r\n";
- $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
- // Additional headers
- $headers .= 'To: <' . $_POST['email'] . '>' . "\r\n";
- $headers .= 'From: My Web Site <justaguy@mywebsite.com>' . "\r\n";
- // Mail it
- mail($to, $subject, $message, $headers);
- //Send them back to the form page with a success message.
- // From here is the html to the success page after e-mail was $theResults = <<< EOD
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
- <title>My Web Site/contact</title>
- <link href="main.css" rel="stylesheet" type="text/css" />
- </head>
- <body>
- <div id="page-wrap" class="group">
- <div id="header">
- <div id="logo"></div>
- <h1>My Web Site</h1>
- <p>Yada yada</p>
- </div><!--END of header-->
- <div id="main-content">
- <div id="results">
- <p>Your request for additional information has successfully been forwarded.</p>
- <p>Thank you for your interest in My Web Site.</p>
- <p> You can expect a prompt response.</p>
- </div>
- </div><!--END of main-content-->
- <div id="sidebar">
- <div id="navigation">
- <ul>
- <li><a href="http://www.mysite.com/">Home<span></span></a></li>
- <li><a href="http://www.mysite.com/about.html">About<span></span></a></li>
- <li><a href="http://www.mysite.com/on-design.html">On Design<em>(my blog)</em><span></span></a></li>
- <li><a href="http://www.mysite.com/quote.html">Get A Quote<span></span></a></li>
- <li><a href="http://www.mysite.com/contact.html">Contact Me <span></span></a></li>
- </ul>
- </div><!--END of navigation-->
- </div><!--END of sidebar-->
- <div id=footer>
- <p>© 2011 My Site / All Rights Reserved.</p>
- <div id="badge"></div>
- </div><!--END of footer-->
- </div><!--END of page-wrap-->
- </body>
- </html>
- EOD;
- echo "$theResults";
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement