<?php
//echo '<pre>';print_r($_POST); //exit;
//error_reporting(1);
$myemail = 'info@dreamholidays.co.in';
$sent = 'Thank you for Details. We will contact you as soon ';
$name = $_POST['name'];
$email = $_POST['email'];
$contact = $_POST['contact'];
$date = $_POST['date'];
$any_special = $_POST['message'];
$webMaster = 'info@dreamholidays.co.in';

if (isset($_POST['contact'])) {

$to = $myemail; 
$subject = "Enquiry - Dream Holidays";

$message = "
<html>
<head>
<title>Enquiry - Dream Holidays</title>
</head>
<body

<table width='200' border='1'>
	<tr>
	<td>Name :</td>
	<td style='padding-left:10px'>".$name."</td>
	</tr>
	<tr>
	<td>Email :</td>
	<td style='padding-left:10px'>".$email."</td>
	</tr>
	 
	<tr>
	<td>Date :</td>
	<td style='padding-left:10px'>".$date."</td>
	</tr>
	 
	<tr>
	<td>Contact :</td>
	<td style='padding-left:10px'>".$contact."</td>
	</tr>
	<tr>
	<td>Message :</td>
	<td style='padding-left:10px'>".$any_special."</td>
	</tr>
	

	</table>
</body>
</html>
";

// Always set content-type when sending HTML email
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=UTF-8" . "\r\n";

// More headers
$headers .= 'From: <'.$webMaster.'>' . "\r\n";

if(mail($to,$subject,$message,$headers))
{
//echo "message sent successfully";
  header("Location: index.html");
}
}
?> 
