| |
");
}
// CHECK IF EMAIL IS VALID ////////////////////////////////////////////////////////////////////
function CheckMail($email) {
if (eregi("^[0-9a-z]([-_.]?[0-9a-z])*@[0-9a-z]([-.]?[0-9a-z])*\.[a-z]{2,4}$", $email)) { return true; }
else { return false; }
}
if ((empty($email)) || (!CheckMail($email)))
{
Die(" - Please go back and fill in a valid e-mail adress!");
}
// CHECK IF EMAIL IS VALID ////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////
// CHECK IF THE FORM HAS BEEN FILLED
if(empty($subject)){
echo(" - There was no subject! ");
}
if(empty($msg)){
echo(" - There was no message! ");
}
////////////////////////////////////////////////////////////////////
// IF THEIR ARE NOT EMPTY
if(!empty($name) && !empty($email) && !empty($subject) && !empty($msg))
{
$headers .= "From: ".$email."";
// WE STORE THE MESSAGE IN A VARIABLE
$messageproper =
"This message was sent from: $name - $email \n" .
"URL\n" .
"------------------------- Aalaapon PC Support Contact Form -------------------------\n\n" .
"Name: $name\n" .
"Phone : $number\n" .
"Email: $email\n" .
"Message: $msg\n" .
"Sender Ip: $ip\n" .
"\n------------------------------------------------------------\n";
mail("$receiver", $subject, $messageproper, "From: Contact Form < $email>");
echo( '
---------------------------------------------------------------------------------------------------------------
Thank you ' . $name . ', your email was sent!We will get back to you as soon as possible.>
--------------------------------------------------------------------------------------------------------------- ' );
} } ?>
Name:
Phone:*
E-mail:
Subject:
Message:
|