Created
August 16, 2018 00:43
-
-
Save joseph-farruggio/e568b58677202cc615fdb5c973347266 to your computer and use it in GitHub Desktop.
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 | |
if($_POST && isset($_POST['name'], $_POST['email'], $_POST['website'], $_POST['subject'], $_POST['message'])) { | |
//user posted variables | |
$name = strip_tags($_POST['name']); | |
$email = strip_tags($_POST['email']); | |
$website = strip_tags($_POST['website']); | |
$subject = strip_tags($_POST['subject']); | |
$message = strip_tags($_POST['message']); | |
//php mailer variables | |
$to = 'joey.farruggio@bizrocket.net'; | |
$body = ' | |
<html> | |
<body> | |
<b>Biz Rocket Contact Form</b> | |
<br /><br /> | |
<b>Contact Details:</b><br /> | |
Name: '.$name.'<br /> | |
Email: '.$email.'<br /> | |
Website: '.$website.'<br /> | |
Message: '.$message.'<br /><br /> | |
</body> | |
</html> | |
'; | |
$headers = 'Content-Type: text/html; charset=UTF-8'; | |
$headers .= 'From: '.$name.' <'.$email.'>'; | |
// send email | |
mail( $to, $subject, $body, $headers ); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment