Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $EmailFrom = "ljmerza@162.243.192.38.com";
- $EmailTo = "ljmerza@gmail.com";
- $Subject = "Audodevs Contact Form";
- $Name = trim(stripslashes($_POST['Name']));
- $Email = trim(stripslashes($_POST['Email']));
- $Message = trim(stripslashes($_POST['Message']));
- // validation
- $validationOK=true;
- if (!$validationOK) {
- print "<meta http-equiv=\"refresh\" content=\"0;URL=error.htm\">";
- exit;
- }
- // prepare email body text
- $Body = "";
- $Body .= "Name: ";
- $Body .= $Name;
- $Body .= "\n";
- $Body .= "Email: ";
- $Body .= $Email;
- $Body .= "\n";
- $Body .= "Message: ";
- $Body .= $Message;
- $Body .= "\n";
- // send email
- $success = mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>");
- // redirect to success page
- if ($success){
- print "<meta http-equiv=\"refresh\" content=\"0;URL=contactthanks.php\">";
- }
- else{
- print "<meta http-equiv=\"refresh\" content=\"0;URL=error.htm\">";
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement