HOME


Mini Shell 1.0
DIR:C:/Inetpub/vhosts/yantrashilpa.com/httpdocs/
Upload File :
Current File : C:/Inetpub/vhosts/yantrashilpa.com/httpdocs/contact-submit.php
<?php
session_start();
error_reporting(E_ALL);
include "includes/db.php" ;
if(isset($_POST['submit-form']))
{
$subject = 'Website Enquiry Form';

$name=$_POST['username'];
$email=$_POST['email'];
$emailus="renibabu111@gmail.com";
 //$emailus="gokulkhan@gmail.com";
$phone=$_POST['phone'];
$subj=$_POST['subject'];
$message=$_POST['message'];
date_default_timezone_set('Asia/Kolkata');
$currentTime = date( 'd-m-Y h:i:s A', time () );

$mail_content    = "Dear Team,<br><br>You have a new Enquiry through website, by <b>".$name."</b> @ ".$currentTime."<br><br>
	<b><u>Enquiry Details</u></b><br><strong>Name:</strong> ".$name."<br><strong>Contact No.</strong>: ".$phone."<br><strong>Email: </strong>".$email."<br><br><strong>Subject: </strong>".$subj."<br><strong>Message: </strong>".$message." <br><br>Thank you, <br> Yanthrashilpa .";

$to = $emailus;
$subject = $subject;
$txt = $mail_content;
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=UTF-8" . "\r\n";
//$headers .= "From: renibabu111@gmail.com";
$headers .= "From: 	info@yantrashilpa.com";
//echo 'test';
if(mail($to,$subject,$txt,$headers))
{
	$_SESSION['messages']="Thank You ".$name.". Your Message has been sent Successfully. We will contact you back soon.";

}
else {
	$_SESSION['messages']="Sorry, the message could not be sent.";
	
}
 header("Location:contact-us.php");
}?>