<?php
//Franchise
if (isset($_POST['contactfra'])) {
	$Subject = 'Ask For Franchise ';
	$ToEmail = 'info@icvassessments.com';



	$me = $_POST['name'];
	$mailheader = 'From : ' . $_POST['email'] . '\r\n';
	$mailheader .= "Reply-To: " . $_POST["email"] . "\r\n";
	$mailheader = "MIME-Version: 1.0" . "\r\n";
	$mailheader .= "Content-type:text/html;charset=UTF-8" . "\r\n";
	$MESSAGE_BODY = "Name : " . $_POST["name"] . "<br>";
	$MESSAGE_BODY .= "Mobile : " . $_POST["mobile"] . "<br>";
	$MESSAGE_BODY .= "Email : " . $_POST["email"] . "<br>";
	$MESSAGE_BODY .= "Address : " . $_POST["address"] . "<br>";
	$MESSAGE_BODY .= "Message : " . $_POST["Message"] . "<br>";



	$mailsend = mail($ToEmail, $Subject, $MESSAGE_BODY, $mailheader);
	if ($mailsend) {
		echo "<script>alert('Thank You " . $me . " your Franchise was sent');</script>";
		echo "<script>window.location.href='../franchise.php';</script>";
		//echo "<script>window.history.back();</script>";
	} else {
		echo "<script>alert(' Franchise was Not sent');</script>";
		//echo "<script>window.history.back();</script>";
		echo "<script>window.location.href='../franchise.php';</script>";
	}

}
?>


<?php
//Contact (Enquiry)
if (isset($_POST['contactUs'])) {
	$Subject = 'Contact Us..';

	$ToEmail = 'info@icvassessments.com';

	$me = $_POST['name'];
	$mailheader = 'From : ' . $_POST['email'] . '\r\n';
	$mailheader .= "Reply-To: " . $_POST["email"] . "\r\n";
	$mailheader = "MIME-Version: 1.0" . "\r\n";
	$mailheader .= "Content-type:text/html;charset=UTF-8" . "\r\n";
	$MESSAGE_BODY = "Name : " . $_POST["name"] . "<br>";
	$MESSAGE_BODY .= "Mobile : " . $_POST["mobile"] . "<br>";
	$MESSAGE_BODY .= "Email : " . $_POST["email"] . "<br>";
	$MESSAGE_BODY .= "Message : " . $_POST["Message"] . "<br>";



	$mailsend = mail($ToEmail, $Subject, $MESSAGE_BODY, $mailheader);
	if ($mailsend) {
		echo "<script>alert('Thank You " . $me . " your Contact was sent');</script>";
		echo "<script>window.location.href='../contact.php';</script>";
		//echo "<script>window.history.back();</script>";
	} else {
		echo "<script>alert(' Contact was Not sent');</script>";
		//echo "<script>window.history.back();</script>";
		echo "<script>window.location.href='../contact.php';</script>";
	}

}
?>


<?php
//Subscribe...................................

if (isset($_POST['newsletter'])) {
	$Subject = 'Subscribe Us..';

	$ToEmail = 'info@icvassessments.com';

	$mailheader = 'From : ' . $_POST['news'] . '\r\n';
	$mailheader .= "Reply-To: " . $_POST["news"] . "\r\n";
	$mailheader = "MIME-Version: 1.0" . "\r\n";
	$mailheader .= "Content-type:text/html;charset=UTF-8" . "\r\n";
	$MESSAGE_BODY .= "Subscriber : " . $_POST["news"] . "<br>";



	$mailsend = mail($ToEmail, $Subject, $MESSAGE_BODY, $mailheader);
	if ($mailsend) {
		echo "<script>alert('Thank You for Subscribe');</script>";
		echo "<script>window.location.href='../index.php';</script>";
	} else {
		echo "<script>alert('Not Subscribe..!');</script>";
		echo "<script>window.history.back();</script>";
	}

}
?>