include("header.php");
if(isset($_POST['submit'])){
$to = "riedelfarms@yahoo.com"; // this is your Email address
//$to = "safiamshaikh@gmail.com";
$from = $_POST['email']; // this is the sender's Email address
$fname = $_POST['fname'];
$lname = $_POST['lname'];
$phone_no= $_POST['phone_no'];
$message1="\n Property Address : ".$_POST['property_address']."\n\n Message : ".$_POST['property_description'];
$subject = "Landowner Enquiry From Riedel Farm LLC";
/*$subject2 = "NAME : " .$fname." ".$lname."
".
"Phone Number : ".$phone_no."
".
"Property Address : " .$property_address."
".
"Property Description : " .$property_description."
Plesae check above informarion given by you.";*/
$message="Dear Riedel Farms Staff,
I am landowner and my information is as below,\n".
"Name : " .$fname." ".$lname."\n\n ".
"Email id : ".$from."\n\n ".
"Phone Number : ".$phone_no." \n ".$message1."\n \n Thank you.";
// $message2 = "Here is a copy of your message " . $fname . "\n\n" . $_POST['message'];
$headers = "From:" . $from;
// $headers2 = "From:" . $to;
$mail=mail($to,$subject,$message,$headers);
if($mail){
$msg="Mail Sent. Thank you " . $fname . ", we will contact you shortly.";
} else {
$msg=print_r(error_get_last());
}
// mail($from,$subject2,$message2,$headers2); // sends a copy of the message to the sender
// You can also use header('Location: thank_you.php'); to redirect to another page.
}
?>