<?php  
if((isset($_POST["name"]) && !empty($_POST["name"])) && (!empty($_POST['email']) && isset($_POST["email"])))
{
	  $name=$_POST["name"];
	  $email=$_POST["email"];
	  
	  $subject = $_POST["subject"];
	  $query=$_POST["query"];
	  
	  $message = $name.'<br>';
	  $message .= $email.'<br/>';
	  $message .= $subject.'<br>';
	  $message .= $query.'<br/>';
	  
	  $to_email = 'pcsaini@gmail.com';
	  $from_email="info@arhosting.in";
	  $dt=date("Y-m-d");
	  /*$con = mysqli_connect("localhost","friend_user","Modi@2018","friend_db");
	  $sql="INSERT INTO users(name, email, mobile, gender,status, reg_date) values
	        ('$name','$email','$mobile','$gender','0','$dt')";
	  mysqli_query($con,$sql);	*/	
	  
	  $headers = "MIME-Version: 1.0" . "\r\n";
      $headers .= "Content-type:text/html;charset=UTF-8" . "\r\n";
	  $headers .= 'From: '.$from_email;
	  mail($to_email,"Enquiry from arhosting.in",$message,$headers);
	  echo "s";
	
}else{
	
	echo "n";
}
	
?>