<?php

if(isset($_POST['submit']))
    {
       $FirstName = $_POST['fname'];
       $LastName = $_POST['lname'];
       $Phone = $_POST['phone'];
       $Email = $_POST['email'];
       $subject = $_POST['subject'];
       $msg = $_POST['message'];
      
       $to = "hamisib1501@gmail.com";
      
      $header = "From: " . $FirstName . "<" . $Email . "> \r\n";
      
      $msg = "Mobile: " . $Phone "\r\n" . $msg;
  
  	$mail = mail($to, $header, $msg, $subject);
  
  if($mail){
  	echo "<script>alert('Your mail is sent!.');</script>";
  }else{
  	echo "<script>alert('Your mail is not sent!.');</script>";
  } 
  
}
?>