Thanks,
Here is the code:
Code: Select all
<?php
if (($_POST[name] == "") ||
($_POST[email] == "")) {
header("Location: survey.html");
exit;
}
$msg = "E-mail sent from Unique Home Designs\n";
$msg .= "Sender's Name:\t$_POST[name]";
$msg .= "Sender's Email:\t$_POST[email]";
$msg .= "Sender's Phone:\t$_POST[phone]";
$msg .= "Style of Home:\t$_POST[styleofhome]";
$msg .= "Aprox Sq Ft:\t$_POST[sq.ft]";
$msg .= "Bedrooms:\t$_POST[bedrooms]";
$msg .= "Baths:\t$_POST[baths]";
$msg .= "Garage:\t$_POST[garage]";
$msg .= "Explain:\t$_POST[explain]\n";
$msg .= "Roof:\t$_POST[roof]";
$msg .= "Lot:\t$_POST[lot]";
$msg .= "Number of Plans:\t$_POST[numberofplans]";
$msg .= "3D:\t$_POST[3D]";
$msg .= "Owner:\t$_POST[owner]";
$to = "dlparker47@gmail.com";
$subject = "Web Site Survey";
$mailheaders = "From: <support@custom-homedesign.com>\n";
$mailheaders .= "Reply_To: $_POST[email]\n";
mail($to, $subject, $msg, $mailheaders);
?>
Code: Select all
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Feedback Survey Form</title>
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
</head>
<body>
Code: Select all
<h1>The following e-mail has been sent:</h1>
<strong>Your Name:</strong><br />
Code: Select all
<strong>Your E-mail Address:</strong><br />
Code: Select all
<strong>Your Phone Number:</strong><br />
<strong>Style of Home:</strong><br />
Code: Select all
<?php echo "$_POST[styleofhome]"; ?>
Code: Select all
<strong>Aprox Sq Ft:</strong><br />
Code: Select all
<?php echo "$_POST[explain]\n"; ?>
Code: Select all
<strong>Number of Plans:</strong><br />
Code: Select all
<?php echo "$_POST[numberofplans]"; ?>
</body>
</html>