Created
August 6, 2013 05:27
-
-
Save ezos86/6162244 to your computer and use it in GitHub Desktop.
PHP Mail Example
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 | |
$name = $_POST['feedback-name']; | |
$email = $_POST['feedback-email']; | |
$message = $_POST['feedback-box']; | |
$to = '[email protected]'; | |
$subject = 'QPME Feedback From Customer Terminal'; | |
$headers = 'From: [email protected]' . "\r\n" . | |
'Reply-To: [email protected]' . "\r\n" . | |
'X-Mailer: PHP/' . phpversion(); | |
mail($to, $subject, $message, $headers); | |
?> |
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
<form style="margin-left:10px; margin-top:20px;" method="post" action="mail-funciton.php"> | |
<label for="feedback-name" style="margin-top:20px;">Name:</label> | |
<input class="input-box" name="feedback-name" value=""/> | |
<label for="feedback-email" style="margin-top:20px;">Email Address:</label> | |
<input class="input-box" type="email" name="feedback-email" value=""/> | |
<label for="feedback-box" style="margin-top:20px;">Enter your feedback:</label> | |
<textarea style="display:block; width: 508px; height:200px; border:1px solid #ccc; padding:3px;" name="feedback-box" id="feedback-box"></textarea> | |
<input style="margin-top:20px;" class="btn btn-inverse" type="submit"> | |
</form> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment