Contact form "thank you" page & post it?
Posted: Tue Apr 15, 2008 7:52 am
I want to make a form f=do two things at once, They work fine by them selves but thanking a person after sending a form and not ever sending it to and email is silly!
I have this code to send the mail:
And this "thank you" page:
How do I make it do both at the same time? In the thank you page it thanks the person by name, otherwise I would just make it go there after posting the message.
I have this code to send the mail:
Code: Select all
<?php include("thank you.php"); ?>
<?php
$name = $_POST['name'] ;
$email = $_POST['email'] ;
$message = $_POST['message'] ;
mail( "akjackson1@gmail.com", "Contact Form", "Name: ". $name . "\r\n\r\n". "Email: " . $email . "\r\n\r\n" . "Message: ". $message . "\r\n\r\n". "Mailing List: ". $mailinglist, "From: $email" );
?>Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Message sent successfully</title>
<meta http-equiv="refresh" content="4; url=http://www.truth-for-youth.com/">
<link rel="stylesheet" type="text/css"href="main.css" />
<body>
<table width="309" border="0" align="center">
<tr>
<td><div align="center" class="Title2">
Thank You <?php
echo "".$_POST['name']."";
?>
</div>
<p align="center" class="style1">Your message was sent successfully!</p>
<p align="center" class="SmallText">If you are not automatically redirected in a few seconds, <a href="http://www.truth-foryouth.com/">click here</a> to proceed.</p>
<p class="style4"> </p></td>
</tr>
</table>
</body>
</html>