I only was trying to modify the template from an article on this website and have run into some difficulty. I have no experience, but was able to get the form part of the survey. The code related to the actual sending of results has not worked for me. I've tried reading other threads on the subject, but because of my lack of understanding the language, I'm missing what I'm doing wrong. Any help would be appreciated. Here is my code:
<title>Redwood Road Future Land Use Survey</title>
<body>
<form action="submit.htm" method="post">
<table border="1">
<tr>
<td>Approxamitely how close to Redwood Road do you live?</td>
<td colspan="5"><input type="radio" name="distance" value="Adjacent" />Adjacent | <input type="radio" name="distance" value="Within 500 feet" />Within 500 feet | <input type="radio" name="distance" value="Within a quarter mile" />Within a quarter mile | <input type="radio" name="distance" value="Within a mile" />Within a mile | <input type="radio" name="distance" value="Within a mile" />Within a mile | <input type="radio" name="distance" value="Over a mile" />Over a mile</td>
</tr>
<tr>
<td>What is your age group?</td>
<td colspan="5"><input type="radio" name="age" value="Under 20" />Under 20 | <input type="radio" name="age" value="21 - 30" />21 - 30 | <input type="radio" name="age" value="31 - 45" />31 - 45 <br /><input type="radio" name="age" value="46 - 60" />46 - 60 | <input type="radio" name="age" value="Over 60" />Over 60</td>
</tr>
<tr>
<td>How long have you lived at your current residence?</td>
<td colspan="5"><input type="radio" name="time" value="Under a year" />Under a year | <input type="radio" name="time" value="1 - 5 years" />1 - 5 years | <input type="radio" name="time" value="6 - 15 years" />6 - 15 years <br /><input type="radio" name="time" value="Over 15 years" />Over 15 years</td>
</tr>
<tr>
<td>What changes would you generally like to see along Redwood Road?</td>
<td colspan="5"><input type="radio" name="change" value="No change" />No change | <input type="radio" name="change" value="Big box retail" />Big box retail | <input type="radio" name="change" value="Smaller retail and service businesses" />Smaller retail and service businesses <br /><input type="radio" name="change" value="Mix of residential and commercial" />Mix of residential and commericial</td>
</tr>
<tr>
<td>What portion along Redwood would you like to see change?</td>
<td colspan="5"><input type="radio" name="portion" value="None" />None | <input type="radio" name="portion" value="Northern quarter" />Northern quarter | <input type="radio" name="portion" value="Northern half" />Northern half <br /><input type="radio" name="portion" value="Northern three quarters" />Northern three quarters | <input type="radio" name="portion" value="From border to border" />From border to border</td>
<td colspan="6" bgcolor="#cccccc"> </td>
</tr>
</tr>
</table><br />
<input type="submit" value="submit" name="submit" />
</form>
</body>
<?php
//Get all $POST variables foreach($POST as $var => $val)
{
${$var} = $val;
}
// Set up the email body
$body_body = "Survey Results:\n";
$body_body = " Distance-------------| ".$distance."\n";
$body_body = " Age Group------------| ".$age."\n";
$body_body = " Time-----------------| ".$time."\n";
$body_body = " Change---------------| ".$change."\n";
$body_body = " Portion--------------| ".$portion."\n";
$to = 'American City <americancity@americancity.com>';
$subject = 'Website Survey Results';
$body = $body_body.$body_footer;
//mail($to, $subject, $body);
?>
</html>