-
-
Save camh96/2cbffeaa79ab633fbe2b to your computer and use it in GitHub Desktop.
Contact Form - see index.html for the form input
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
include 'config.php'; | |
error_reporting (E_ALL ^ E_NOTICE); | |
$post = (!empty($_POST)) ? true : false; | |
if($post) | |
{ | |
$name = stripslashes($_POST['name']); | |
$email = trim($_POST['email']); | |
$message = stripslashes($_POST['message']); | |
$error = ''; | |
if(!$error) | |
{ | |
$mail = mail(WEBMASTER_EMAIL, $subject, $message, | |
"From: ".$name." <".$email.">\r\n" | |
."Reply-To: ".$email."\r\n" | |
."X-Mailer: PHP/" . phpversion()); | |
if($mail) | |
{ | |
header("Location: ../index.php?success#contact"); | |
} | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment