<?php
    if(isset($_POST['submit'])){
    $name = $_POST['name'];
    $visitor_email = $_POST['email'];
    $phone = $_POST['phone'];
    $street = $_POST['street'];
    $city = $_POST['city'];
    $state = $_POST['state'];
    $zip = $_POST['zip'];
    $country = $_POST['country'];
   

    $to = "info@luvanexgroup.commx";
    $email_form = 'sellyourhouse@luvanexgroup.com';
    $email_subject = "Sell Your House Now - Form";
    $email_body = "User Name: $name.\n".
                  "user Email: $visitor_email.\n".
                  "Phone: $phone.\n".
                  "Street: $street. \n".
                  "City: $city.\n". 
                  "State: $state. \n".
                  "zip: $zip. \n".
                  "Country: $country. \n"; 

    
    $headers = "From: $email_form \r\n";
    $headers .= "Reply-To: $visitor_email \r\n";

    mail($to,$email_subject,$email_body,$headers);

    header("Location: Thanks.html");
}
?>