<?php

  $email_to = "contact@biooxypharma.com";
//   $email_to = "baburao4790@gmail.com";
   
   $email_subject = "Contact form submitted from Bio-Oxy Pharma";
    
    $first_name = $_POST['name']; // required
    $email_from = $_POST['email']; // required
    $comments = $_POST['subject']; // not required
    $message = $_POST['message']; // not required
    
    $email_message = "<h4>Please check the contact form details</h4>
<p>Name : $first_name </p>
<p>Email : $email_from </p>  
<p>Subject : $comments</p>
<p>Message : $message</p>"
;    
    
   // $email_message = "Form details below.\n\n"."<br>";
    

    //$email_message .= "Full Name: ".$first_name."<br>";
    //$email_message .= "Email: ".$email_from."<br>";
    //$email_message .= "Phone: ".$comments."<br>";
    //$email_message .= "Message: ".$message;
 
 
/*	$headers = 'From: '.$email_from."\r\n".
'Reply-To: '.$email_from."\r\n" .
"Content-Type: text/html; charset=ISO-8859-1\r\n" .
"MIME-Version: 1.0\r\n";
$headers.= 'X-Mailer: PHP/' . phpversion();
*/
$headers  = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= 'From: '.$email_to."\r\n".
    'Reply-To: '.$email_to."\r\n" .
    'X-Mailer: PHP/' . phpversion();

$retval = mail($email_to, $email_subject, $email_message, $headers);  

if($retval == '1')
{
 $retval = '1';
 echo "<script>window.location.href = 'index.html';alert('Contact Form Submitted Successfully');</script>";
}
else
{
    $retval = '2';
    echo "<script>window.location.href = 'contact.html';alert('something went wrong');</script>";
}

//echo "retval".$retval;

//echo "<script>window.location.href = 'thankyou.php?retval=$retval';</script>";



?>