<?php
	
$name=$_POST['first-name'];
$surname=$_POST['last-name'];
$email=$_POST['email'];
$contact=$_POST['phone'];
$msg=$_POST['message'];

$email_from= 'info@kmlegalservices.in';

$email_subject= "New form submission";

$email_body="User Name:$name.\n".
				"User Name:surname.\n".
				"User Email:$email.\n".
				"User Phone:$contact.\n".
				"User Message:$msg.\n";

$to="kmlegalservices1@gmail.com";
//$to="mention the email account to which you want to receive the email";

$headers="From: $email_from\r\n";

$headers="Reply-To: $email\r\n";

mail($to,$email_subject, $email_body, $headers);

header("Location:index.html");

?>