<?php
if ($_POST ['parse_var'] == "contactform") {
$emailTitle = 'New Email From Your Website';
$yourEmail = '
[email protected]';
$nameField = $_POST ['name'];
$emailField = $_POST ['email'];
$phoneField = $_POST ['phone'];
$messageField = $_POST ['message'];
$body = <<<EOD
Name: $nameField
Email: $emailField
Phone: $phoneField
Message: $messageField
EOD;
$headers = "From: $emailField\r\n";
$headers .= "Content-type: text/html\r\n";
$success = mail($yourEmail, $emailTitle, $body, $headers);
$sent = " Thank you. You message has been sent.";
}
?>
Leapquest
|
Name:
">
Your Email:
Phone:
Message:
</td>
<td width="311" align="center"><img src="images/frog.jpg" width="221" height="228" /></td>
</tr>
<tr>
<td colspan="2" valign="top"><input type="hidden" name="parse_var" id="parse_var" value="contactform"/> <input type="submit" name="submit" id="submit" value="Submit"><?php print "$sent" ?></td>
</tr>
</table>
<br />
<div align="center"></div></td>
|
|
© 2013 Leapquest |
|