( ◞≼☸≽◟ ._ゝ◞≼☸≽◟)zcsdf吖
<?php
$errors = '';
$myemail = 'jaisone@global.saraya.com';//<-----Put Your email address here.
if(empty($_POST['firstname']) ||
empty($_POST['lastname']) ||
empty($_POST['email']) ||
empty($_POST['country']) ||
empty($_POST['companyname']) ||
empty($_POST['companytype']) ||
empty($_POST['inquirysubject']))
{
}
$firstname = $_POST['firstname'];
$lastname = $_POST['lastname'];
$email = $_POST['email'];
$country = $_POST['country'];
$companyname = $_POST['companyname'];
$companytype = $_POST['companytype'];
$inquirysubject = $_POST['inquirysubject'];
if (!preg_match(
"/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$/i",
$email))
{
$errors .= "\n Error: Invalid email address";
}
if( empty($errors))
{
$to = $myemail;
$email_subject = "Sanistar Site Contact form submission: $companyname";
$email_body = "You have received a new message from the site www.sanistar.pro ".
" Here are the details:\n First Name: $firstname \n Last Name: $lastname \n Company Name: $companyname \n Email: $email \n Country: $country \n Company Type: $companytype \n Inquiry Subject: \n $inquirysubject";
$headers = "From: $myemail\n";
$headers .= "Reply-To: $email";
mail($to,$email_subject,$email_body,$headers);
//redirect to the 'thank you' page
header('Location: ../contact-us-thank-you.html');
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Contact form handler</title>
</head>
<body>
<!-- This page is displayed only if there is some error -->
<?php
echo nl2br($errors);
?>
</body>
</html>