<?php
//submit_form.php
if(isset($_POST['contactFrmSubmit'])){
	$name   = $_POST['name'];
    $email  = $_POST['email'];
    $phone= $_POST['phone'];
	$country=$_POST['country'];
	$msg=$_POST['msg'];	
	$prop_id=$_POST['prop_id'];
	$propertytitle=$_POST['propertytitle'];	
	$property=$_POST['property'];	
	$categroy=$_POST['categroy'];
		
   	if($categroy==1) { $categroy_name="Rent"; } else { $categroy_name="Sale";}
               
	$city=$_POST['city'];
				if($city==1) {
               $to = 'infotopnotchrealestate@gmail.com';
				}
				else {
					 $to = 'infotopnotchrealestate@gmail.com';
				}
				//$to = 'prog2@infobahnworld.com'; 
                $subject = "Call back Request from Top Notch Received For  ". $propertytitle. " - ".$property. " For ".$categroy_name;
                $htmlContent = " 
                    <h1>Contact request details</h1> 
                    <p><b>Name: </b>".$name."</p> 
                    <p><b>Email: </b>".$email."</p> 
					<p><b>Phone: </b>".$phone."</p>
					
                "; 
                          
                          
                $headers = "MIME-Version: 1.0" . "\r\n"; 
                $headers .= "Content-type:text/html;charset=UTF-8" . "\r\n"; 
                $headers .= 'From:'.$name.' <'.$email.'>' . "\r\n"; 
      
   
     
    // Send email
    //if(mail($to,$subject,$htmlContent,$headers)){
		mail($to,$subject,$htmlContent,$headers);
        $status = 'ok';?>
        
        <?php
    //}else{
       // $status = 'ok';?>
        
        
   
   <?php
   // }
     
    // Output status
    echo $status;die;
}