|
|
StacyAndJanet dot com's Market Analysis Request
if($action == "send") {
if ( !$form[name] || !$form[address] || !$form[phone] || !$form[city] || !$form[email] ) {
print "
Home Market Analysis Error
";
if(!$form[name]) {
print " You have not included
your name.
Your name is required to process this form. ";
}
if(!$form[address]) {
print " You have not included
your address.
Your address is required to process this form. ";
}
if(!$form[phone]) {
print " You have not included
your telephone number.
Your telephone number is required to process this form. ";
}
if(!$form[city]) {
print " You have not included
your city.
Your city is required to process this form. ";
}
if(!$form[email]) {
print " You have not included
your email address.
Your email address is required to process this form. ";
}
print " Please use your browser's BACK function or the link below
to return to the Dream Home Finder Form and resubmit.
Thank you!
";
print "Return to
Market Analysis Page ";
exit;
}
if(!$form[subject]) {
$form[subject] = "$no_subject"; }
if(!$form[name]) {
$form[name] = "$no_name"; }
$final_recipient = "$recipient@$domain";
$letter = "Greetings from $form[name]!\n\n";
$letter .= "My Address is:\n";
$letter .= "\t" . $form[address] . "\n";
$letter .= "\t" . $form[city] . "\n\n";
$letter .= "My phone number is: $form[phone]\n";
if ($form[email]) {
$letter .= "My email address is: $form[email]\n";
}
if ($form[fax]) {
$letter .= "My FAX number is: $form[fax]\n";
}
if ( $form[prop_single] || $form[prop_town] || $form[prop_condo] || $form[prop_duplex] || $form[prop_custom] || $form[prop_lot] || $form[prop_other] ) {
$letter .= "\nMy property may be classified as: ";
if ($form[prop_single]) { $prop = "Single Family"; }
if ($form[prop_town]) { $prop = "Townhouse"; }
if ($form[prop_condo]) { $prop = "Condominium"; }
if ($form[prop_duplex]) { $prop = "Duplex"; }
if ($form[prop_custom]) { $prop = "Custom"; }
if ($form[prop_lot]) { $prop = "Lots and Land"; }
if ($form[prop_other]) { $prop = "Other"; }
$letter .= $prop . "\n";
}
if ($form[arch_style]) $letter .= "\nThe style of my home is: " . $form[arch_style] . "\n";
if ( $form[basement] || $form[num_bedrooms] || $form[garage] || $form[baths] || $form[full_bath] || $form[half_bath] || $form[ac] || $form[heating] ) { $letter .= "\nThe home has:\n ";
if ($form[num_bedrooms]) { $letter .= "\t" . $form[num_bedrooms] . " bedroom(s)\n "; }
if ($form[garage]) { $letter .= "\t" . $form[garage];
if (($form[garage] != "No Garage" ) && $form[cars] ) { $letter .= ", Capacity: " . $form[cars]; }
$letter .= "\n";
}
if ($form[full_bath]) { $letter .= "\t" . $form[full_bath] . " full bathroom(s)\n"; }
if ($form[half_bath]) { $letter .= "\t" . $form[half_bath] . " half bathroom(s)\n"; }
if ($form[basement]) { $letter .= "\t" . $form[basement] . "\n"; }
if ($form[ac]) { $letter .= "\t" . $form[ac] . "\n"; }
if ($form[heating]) { $letter .= "\t" . $form[heating] . "\n"; }
}
if ( $form[feature_family] || $form[feature_den] || $form[feature_laundry] || $form[feature_fireplace] ||
$form[feature_dining] || $form[feature_pool] || $form[feature_porch] || $form[feature_skylight] ||
$form[feature_bar] || $form[feature_vac] || $form[feature_suite] || $form[feature_fence] ) {
$letter .= "\nThe home has the following features: \n";
if ( $form[feature_family] ) { $letter .= "\t" . $form[feature_family] . "\n"; }
if ( $form[feature_den] ) { $letter .= "\t" . $form[feature_den] . "\n"; }
if ( $form[feature_laundry] ) { $letter .= "\t" . $form[feature_laundry] . "\n"; }
if ( $form[feature_fireplace] ) { $letter .= "\t" . $form[feature_fireplace] . "\n"; }
if ( $form[feature_dining] ) { $letter .= "\t" . $form[feature_dining] . "\n"; }
if ( $form[feature_pool] ) { $letter .= "\t" . $form[feature_pool] . "\n"; }
if ( $form[feature_porch] ) { $letter .= "\t" . $form[feature_porch] . "\n"; }
if ( $form[feature_skylight] ) { $letter .= "\t" . $form[feature_skylight] . "\n"; }
if ( $form[feature_bar] ) { $letter .= "\t" . $form[feature_bar] . "\n"; }
if ( $form[feature_vac] ) { $letter .= "\t" . $form[feature_vac] . "\n"; }
if ( $form[feature_suite] ) { $letter .= "\t" . $form[feature_suite] . "\n"; }
if ( $form[feature_fence] ) { $letter .= "\t" . $form[feature_fence] . "\n"; }
}
if ( $form[square_feet] ) { $letter .= "\nSquare Footage: " . $form[square_feet] . "\n"; }
if($form[comments]) {
$letter .= "\nMy comments are as follows:\n"; }
$letter .= "$form[comments]\n\n";
$letter .= "Thank you very much. I look forward to hearing from you.\n\n";
$letter .= "$form[name]\n\n";
mail("$final_recipient","$form[subject]","$letter", "Reply-To: $form[name] <$form[email]>\n");
print " Thank you!
";
print "Thank you for submitting your Dream Home Finder request.
";
print "Return to Welcome Page ";
} else {
print "
";
}
?>
|
|