"; }
if($comments == null) { $error=1; $errormessage .= "Comments is blank "; }
if($email == null) { $error=1; $errormessage .= "Email is blank "; }
// check for an error, print error message and exit.
if($error == 1) { echo $errormessage; exit(); }
//If it has been pressed send the email
//Set variables for email
$to = "info@bipan.com.np"; //Set this to your email address
$sub = "My Bro"; //Set this to the subject of the email
$msg = "email: " . $email . "nName: " . $name . "nComment:n" . $comments; //Set this to the content of the email
$headers = "From: " . $email . "rn";
$headers .= "Date: " . date("r");
//Send email
mail($to,$sub,$msg,$headers);
//Confirm that email has been sent
echo"Email sent.";
}
else{
//If it has not been pressed display form
?>
|