Here is my code for the sendmail php. First off, I have a simple form for my customers to fill out: email, firstName, lastName, address, city, state, zip, phone and fax. I want this information to be sent yo my email.....
<?php
$message .= $REQUEST ['email'] ;
$message .= $REQUEST ['firstName'] ;
$message .= $REQUEST ['lastName'] ;
$message .= $REQUEST ['address'] ;
$message .= $REQUEST ['city'] ;
$message .= $REQUEST ['state'] ;
$message .= $REQUEST ['zip'] ;
$message .= $REQUEST ['phone'] ;
$message .= $_REQUEST ['fax'] ;
mail( "myemail@email.com", "Austin Buyer on the line!",
$message, "From: $email" );
header( "Location: http://www.MyWebsiteToForward.com" );
?>
And this is an example email result:
JohnDoe@yahoo.comJohnDoe1234 West First St95422(555) 654-9432(800) 442-2343
I want to have it look like this:
JohnDoe@yahoo.com
John Doe
1234 West First St
Placerville, CA 95422
(555) 654-9432
(800) 442-2343
Oh and if your wondering, no I couldn't get the city and state to work.
If you could, please tell me exactly what to fix... I suck at this.
Here is the revised html:
<form method="post" action="sendmail.php">
<table>
<tr> <td> Email: </td> <td> <input type="text" name="email" value="" size="20"> </td></tr>
<tr> <td> First Name: </td> <td> <input type="text" name="firstName" value="" size="20"> </td></tr>
<tr> <td> Last Name: </td> <td> <input type="text" name="lastName" value="" size="20"></td></tr>
<tr> <td> Address: </td> <td> <input type="text" name="address" value="" size="20"></td></tr>
<tr> <td> City: </td> <td> <input type="text" name="City" value="" size="20"></td></tr>
<tr> <td> State: </td> <td> <input type="text" name="State" value="" size="20"></td></tr>
<tr> <td> Zip: </td> <td> <input type="text" name="zip" value="" size="20"></td></tr>
<tr> <td> Phone: </td> <td> <input type="text" name="phone" value="" size="20"></td></tr>
<tr> <td> Fax: </td> <td> <input type="text" name="fax" value="" size="20"></td></tr>
<tr> <td align="center" colspan="2"><input type="submit" name="submit" value="Free Instant Access!"></td></tr>
</table>
</form>