<?php
if(isset($_POST['select'])&& isset($_POST['name'])&& isset($_POST['mail'])&& isset($_POST['phone']) && isset($_POST['desc'])){
$option = $_POST['select'];
$personName = $_POST['name'];
$mail = $_POST['mail'];
$phone = $_POST['phone'];
$desc = $_POST['desc'];
if(!empty($option) && !empty($personName) && !empty($mail) && !empty($desc) ){
$to = "gnana@8perfmediaworks.com";
$sub = "Order";
$msg = "Price and Weight : ".$option."<br/>Name : ".$personName."<br/> Email : ".$mail."<br/>Phone Number ".$phone."<br/> Message : ".$desc;
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "From: ".$personname."<".$mailid.">\n";
$headers .= "Reply-To:<".$mailid.">\n";
$headers .= "To:<".$to.">\n";
$headers .= "Subject:<".$subject.">\n";
$headers .= "Mailed-By:<".$mailid.">\n";
$headers .= "X-Mailer: PHP/".phpversion()."\n";
if(mail($to, $sub, $msg, $headers) ){
echo "<script>alert('Thanks for the interest. Some one from our team will be in touch with you soon...');</script>";
echo '<script> window.location = "";</script>';
}else{
echo "<script>alert('Message sent unsuccessfully');</script>";
}
} else {
echo "<script>alert('All Fields are required');</script>";
}
}
?>
if(isset($_POST['select'])&& isset($_POST['name'])&& isset($_POST['mail'])&& isset($_POST['phone']) && isset($_POST['desc'])){
$option = $_POST['select'];
$personName = $_POST['name'];
$mail = $_POST['mail'];
$phone = $_POST['phone'];
$desc = $_POST['desc'];
if(!empty($option) && !empty($personName) && !empty($mail) && !empty($desc) ){
$to = "gnana@8perfmediaworks.com";
$sub = "Order";
$msg = "Price and Weight : ".$option."<br/>Name : ".$personName."<br/> Email : ".$mail."<br/>Phone Number ".$phone."<br/> Message : ".$desc;
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "From: ".$personname."<".$mailid.">\n";
$headers .= "Reply-To:<".$mailid.">\n";
$headers .= "To:<".$to.">\n";
$headers .= "Subject:<".$subject.">\n";
$headers .= "Mailed-By:<".$mailid.">\n";
$headers .= "X-Mailer: PHP/".phpversion()."\n";
if(mail($to, $sub, $msg, $headers) ){
echo "<script>alert('Thanks for the interest. Some one from our team will be in touch with you soon...');</script>";
echo '<script> window.location = "";</script>';
}else{
echo "<script>alert('Message sent unsuccessfully');</script>";
}
} else {
echo "<script>alert('All Fields are required');</script>";
}
}
?>
No comments:
Post a Comment