<?php 
ob_start();
error_reporting(0);
session_start();
 if($_POST['6_letters_code']==$_SESSION['6_letters_code'])
{
  $to = "archakam.p@gmail.com, ahmed.mechknowsoft@gmail.com";

$subject = "wedding priest";

$message ='<table height="40%" width="60%" align="" border="10" cellpadding="5" cellspacing="5" bgcolor="#FFCC99">

                      <tbody>
					  					
                        <tr>

                          <td width="38%" align="center" class="cntnt"><span class="style9">Name</span></td>

                          <td class="cntnt" width="9%" align="center">:</td>

                          <td width="53%" height="30">'.$_POST['fname'].'</td>

                        </tr>
						  <tr>

                          <td width="38%" align="center" class="cntnt"><span class="style9">Email</span></td>

                          <td class="cntnt" width="9%" align="center">:</td>

                          <td width="53%" height="30">'.$_POST['email'].'</td>

                        </tr>

						<tr>

                          <td class="cntnt" align="center"><span class="style9">Phone Number</span></td>

                          <td class="cntnt" align="center">:</td>

                          <td height="30">'.$_POST['phone'].'</td>

                        </tr>

						 <tr>

                          <td class="cntnt" align="center"><span class="style9">Message</span></td>

                          <td class="cntnt" align="center">:</td>

                          <td height="30">'.$_POST['message'].'</td>

                        </tr>
			         </tbody>

                    </table>';

	//echo $message;exit;



// Always set content-type when sending HTML email

$headers = "MIME-Version: 1.0" . "\r\n";

$headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n";

$abc="ContactUs";

// More headers

$headers .= 'From: '.$abc.  "\r\n";

//$headers .= 'Cc: myboss@example.com' . "\r\n";
mail($to,$subject,$message,$headers);
header("location:thanku.php");
}
else {

	$_SESSION['msg']="The Validation code does not match!";
		header("location:contact.php");
	}
?>