if(count($_POST)>0)
{
$arrEmailVal['name'] = $_POST['txt_name'];
$arrEmailVal['address'] = $_POST['txt_address'];
$arrEmailVal['city'] = $_POST['txt_city'];
$arrEmailVal['state'] = $_POST['txt_state'];
$arrEmailVal['code'] = $_POST['txt_code'];
$arrEmailVal['country'] = $_POST['txt_country'];
$arrEmailVal['email'] = $_POST['txt_email'];
$arrEmailVal['dayphone'] = $_POST['txt_day_phone'];
$arrEmailVal['evephone'] = $_POST['txt_eve_phone'];
$arrEmailVal['fax'] = $_POST['txt_fax'];
$arrEmailVal['contacttime'] = $_POST['sel_contacttime'];
$arrEmailVal['propertytype']= $_POST['sel_propert_type'];
$arrEmailVal['yearbuilt'] = $_POST['txt_year'];
$arrEmailVal['sqfoot'] = $_POST['txt_sqft'];
$arrEmailVal['timeframe'] = $_POST['sel_time_frame'];
$arrEmailVal['bedrooms'] = $_POST['txt_bedrooms'];
$arrEmailVal['bathrooms'] = $_POST['txt_bathrooms'];
$arrEmailVal['garage'] = $_POST['txt_sqftsel_garage'];
$arrEmailVal['basement'] = $_POST['sel_basement'];
$arrEmailVal['timemove'] = $_POST['sel_move'];
$arrEmailVal['agent'] = $_POST['rad_agent'];
$arrEmailVal['buy'] = $_POST['rad_buy'];
$arrEmailVal['sell'] = $_POST['rad_sell'];
$arrEmailVal['broker'] = $_POST['rad_broker'];
}
if(isset($_POST['hdnSubmit']) && $_POST['hdnSubmit']=="submit")
{
$SendToEmail = "romeo@romeorealty.com";//$emailaddress; ## Your Email Address
$yoursubject = "Evaluation Form"; ## The Email Subject Line
$EmailFooter = "
Kind Regards
";
## Send the Email to you ....
$yoursubject = "$yoursubject";
$emailtext = "
-----------------------------------------------------------------------------
".$yoursubject."
-----------------------------------------------------------------------------
".$_POST['txt_name']." has visited your website and would like you to reply to their enquiry.
The details they entered on your website is:
Name: ".$_POST['txt_name']."
Address: ".$_POST['txt_address']."
City: ".$_POST['txt_city']." ".$_POST['lname']."
State: ".$_POST['txt_state']."
Post Code: ".$_POST['txt_code']."
Country: ".$_POST['txt_country']."
Email: ".$_POST['txt_email']."
Day Phone: ".$_POST['txt_day_phone']."
Evening Phone: ".$_POST['txt_eve_phone']."
Fax: ".$_POST['txt_fax']."
Contact Time: ".$_POST['sel_contacttime']."
Property Type: ".$_POST['sel_propert_type']."
Year Build: ".$_POST['txt_year']."
Sq. Foot: ".$_POST['txt_sqft']."
Time Frame: ".$_POST['sel_time_frame']."
Bedrooms: ".$_POST['txt_bedrooms']."
Bathrooms: ".$_POST['txt_bathrooms']."
Garage Type: ".$_POST['txt_sqftsel_garage']."
Basement: ".$_POST['sel_basement']."
Time frame for move: ".$_POST['sel_move']."
Currently working with agent: ".$_POST['rad_agent']."
Willing to buy, if current home is sold: ".$_POST['rad_buy']."
Need to sell home to buy: ".$_POST['rad_sell']."
Refer to a mortgage broker: ".$_POST['rad_broker']."
Kind Regards";//YourName." Online Enquiry Form".$YourWebsiteURL."
$yoursubject = stripslashes($yoursubject);
$emailtext = stripslashes($emailtext);
$header="From: ".$_POST['txt_email']."\n";
$header.="Content-type: text/html\n";
$strReturnVal = @mail("$SendToEmail", $yoursubject, $emailtext, $header); ## Email Sent
if($strReturnVal==true)
{
$strMessage = "Evaluation form submitted successfully.";
}
}
?>