<?php
if($_POST['Email_address']){
$to = "Your Email Address";
$from = $_POST["Email_address"];
$message = " <strong>First Name: </strong>".$_POST["Your_name"]."<br />";
$message .= " <strong>Email: </strong>".$_POST["Email_address"]."<br />";
$message .= " <strong>Contact number: </strong>".$_POST["Contact_number"]."<br />";
$message .= " <strong>Message: </strong>".$_POST["Message"]."<br />";
$subject = 'Contact Us';
$headers = "From: ".$_POST["Email_address"]."\n";
$headers .= "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n";
$send = mail($to,$subject,$message,$headers);
if($send)
{
echo "success";
}
else
{
echo "error";
}
}
?>
No comments:
Post a Comment