http://custom-homedesign.com/survey.html
http://custom-homedesign.com/send_survey.php
Thanks,
Doug Parker
Absolute Web Hosting and Design, LLC
http://absolute-webhosting.com
Moderator: General Moderators
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>Code: Select all
<?php echo "$_POST[name]"; ?>Code: Select all
<strong>Your E-mail Address:</strong><br />Code: Select all
<?php echo "$_POST[email]"; ?>Code: Select all
<strong>Your Phone Number:</strong><br />Code: Select all
<?php echo "$_POST[phone]"; ?>Code: Select all
<?php echo "$_POST[styleofhome]"; ?>Code: Select all
<strong>Aprox Sq Ft:</strong><br />Code: Select all
<?php echo "$_POST[sq.ft]"; ?>Code: Select all
<strong>Bedrooms:</strong><br />Code: Select all
?php echo "$_POST[bedrooms]"; ?>Code: Select all
<strong>Baths:</strong><br />Code: Select all
<?php echo "$_POST[baths]"; ?>Code: Select all
<strong>Garage:</strong><br />Code: Select all
<?php echo "$_POST[garage]"; ?>Code: Select all
<strong>Explain:</strong><br />Code: Select all
<?php echo "$_POST[explain]\n"; ?>Code: Select all
<strong>Roof:</strong><br />Code: Select all
<?php echo "$_POST[roof]"; ?>Code: Select all
<strong>Lot:</strong><br />Code: Select all
<?php echo "$_POST[lot]"; ?>Code: Select all
<strong>Number of Plans:</strong><br />Code: Select all
<?php echo "$_POST[numberofplans]"; ?>Code: Select all
<strong>3D:</strong><br />Code: Select all
<?php echo "$_POST[3D]"; ?>Code: Select all
<strong>Owner:</strong><br />Code: Select all
<?php echo "$_POST[owner]"; ?>Code: Select all
echo 'TO:'.$to.'<br>Subj:'.$subject.'<br>MSG:'.$msg.'<br>Headers:'.$mailheaders;