Here's my HTML:
<form class="appnitro" method="post" action="contactformprocess.php">
<h2>Information Request</h2>
<p>Thank you for your interest. Please complete the following information so that we can help serve you better.</p>
<p>Name: <br>
<input name= "name" class="element text medium" maxlength="255" value=""/>
</p>
<p>Street Address <br>
<input name="address" class="element text medium" value="" type="text"><br>
City <br>
<input name="city" class="element text medium" value="" type="text"><br>
State <br>
<input name="state" class="element text medium" value="" type="text"><br>
Zip Code <br>
<input name="zip" class="element text medium" value="" type="text">
</p>
<p>Daytime Phone <br>
<input name="phone" class="element text medium" type="text" maxlength="255" value=""/>
</p>
<p> E-mail<br>
<input name="email" class="element text medium" type="text" maxlength="255" value=""/>
</p>
<p> I am a:<br>
<input name="owner" type="radio" value="homeowner" checked="checked"/>Homeowner
<input name="owner" type="radio" value="Builder/Contractor"/>Builder/Contractor
</p>
<p>I am Interested in:<br>
<input name="interest[]" type="checkbox" value="A Storage Shed" />
A Storage Shed<br>
<input name="interest[]" type="checkbox" value="A Garage" />
A Garage<br>
<input name="interest[]" type="checkbox" value="A Gazebo" />
A Gazebo<br>
<input name="interest[]" type="checkbox" value="Other" />
Other<br>
<input name="interest[]" type="checkbox" value="I'd like information about financing programs" />
I'd like information about financing programs
</p>
<li id="li_6" >
<label class="description" for="element_6">Additional Comments: </label>
<div>
<textarea id="element_6" name="element_6" class="element textarea medium"></textarea>
</div>
</li>
<li class="buttons">
<input type="submit" value="Submit" id="submit" class="form-submit" />
</li>
</ul>
</form>
and here's my PHP: (I removed my email address on purpose)
<?php
/* Subject and Email variables */
$emailSubject = 'Greys Info Request';
$webMaster = '
[email protected]';
/* Gathering Data Variables */
$nameField = $_POST['name'];
$addressField = $_POST['address'];
$cityField = $_POST['city'];
$stateField = $_POST['state'];
$zipField = $_POST['zip'];
$phoneField = $_POST['phone'];
$emailField = $_POST['email'];
$ownerField = $_POST['owner'];
$interestField = (isset($_POST['interest']))?implode(',',$_POST['interest']):'No interests indicated';
$commentField = $_POST['element_6'];
$body = <<<EOD
<br><hr><br>
Name: $name <br>
Address: $address <br>
City: $city <br>
State: $state <br>
Zip Code: $zip <br>
Phone: $phone <br>
Email: $email <br>
Owner: $owner <br>
Interested in: $interest <br>
Comments: $element_6 <br>
EOD;
$headers = "From: $email\r\n";
$headers .= "Content-type: text/html\r\n";
$success = mail($webMaster, $emailSubject, $body,
$headers);
/* Results */
$theResults = <<<EOD
<html>
<head>
<title>Greys Woodworks Info Request</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
body {
background-color: #f1f1f1;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
font-style: normal;
line-height: normal;
font-weight: normal;
color: #666666;
text-decoration: none;
}
-->
</style>
</head>
<div>
<div align="left">Thank you for your interest! Your email will be answered very soon!</div>
</div>
</body>
</html>
EOD;
echo "$theResults";
?>