Place this code in a file called send_email.php
Code:
<?php
$names = strip_tags($_POST["names"]);
$emails = strip_tags($_POST["e-mails"]);
$phones = strip_tags($_POST["phones"]);
$methods = strip_tags($_POST["methods"]);
$comment = strip_tags($_POST["comment"]);
$message = "<html><body>";
$message .= "$names<br>";
$message .= "Email: $emails<br>";
$message .= "Phone: $phones<br>";
$message .= "Contact Method: $methods<br />";
$message .= "Message: <br /><hr />$comment";
$message .= "</body></html>";
//this email is the email that shows up in the from collumn in the email
$headers = "From: Web Page Email <information@domain.com>\r\n";
$headers .= 'Content-type: text/html; charset=utf-8';
//this email is where the form is sent
mail("Customer Service <info@driveflexfuel.com>","Customer Questions",$message,$headers);
?>
Your question or comment has been sent.<br />
We will return your message as soon as posible.<br />
Most receive a message within 12 hours. <br />
Thank you for visiting www.abcdefg.com. <br />
Place this form in a page of your choice.
Code:
<form action="send_email.php" method="post">
<table border="0" cellpadding="3" cellspacing="2" align="center">
<tr>
<td align="right">Name:</td>
<td>
<input name="names" type="text" id="names" size="35" maxlength="80">
</td>
</tr>
<tr>
<td align="right">E-mail:</td>
<td><input name="e-mails" type="text" id="e-mails" size="35" maxlength="80"></td>
</tr>
<tr>
<td align="right">Phone:</td>
<td><input name="phones" type="text" id="phones" size="35" maxlength="80"></td>
</tr>
<td valign="top" align="right">
Prefered<br>Contact Method
</td>
<td>
<select name="methods" id="methods" style="width: 237px;">
<option>Choose One</option>
<option>Email</option>
<option>Phone</option>
</select>
</td>
</tr>
<tr>
<td align="right" valign="top">Message:</td>
<td>
<textarea name="comment" cols="35" rows="6" id="comment"></textarea>
</td>
</tr>
<tr>
<td> </td>
<td>
<input type="submit" name="Submit" value="Submit Message">
</td>
</tr>
</table>
</form>
if you have any questions please feel free to ask