/* Edit these preferences to suit your needs */
$mailto = 'april.nyunt@mws-hr.com.mm'; // insert the email address you want the form sent to
$returnpage = 'thankyou.html'; // insert the name of the page/location you want the user to be returned to
$sitename = 'http://mws-hr.com.mm/'; // insert the site name here, it will appear in the subject of your email
/* Do not edit below this line unless you know what you're doing */
$name = $_POST['name'];
$email = $_POST['email'] ;
$phone = $_POST['phone'] ;
$enquiry2 = stripslashes($_POST['query2']);
$enquiry = stripslashes($_POST['query3']);
if (!$name) {
print("Error: Please provide your name.
Back");
exit;
}
if (!$email) {
print("Error: Please provide an email address.
Back");
exit;
}
if (!$confirm) {
print("Error: Please provide an email address.
Back");
exit;
}
if ($email==$confirm)
{
}
else
{
print "Error:Your email and confirm do not match.
Back";
exit;
}
if (!$phone) {
print("Error: Please provide an phone number.
Back");
exit;
}
if (!$enquiry) {
print("Error: Please provide your enquiry details.
Back");
exit;
}
if (!$enquiry2) {
print("Error: Please provide your enquiry details.
Back");
exit;
}
if (!eregi("^[a-z0-9]+([-_\.]?[a-z0-9])+@[a-z0-9]+([-_\.]?[a-z0-9])+\.[a-z]{2,4}", $email)){
print("Error: this email address is not in a valid format.
Back");
exit;
}
$message = "\n$name submitted the following message:\n\n$enquiry\n\nTheir contact details are as follows:\n\nName: $name\nEmail Address: $email\n\n";
mail($mailto, "$sitename Contact Form Enquiry from $name", $message, "From: $email");
header("Location: " . $returnpage);
?>