PHP scripting for form with multiple checkboxes
I am new to Dreamweaver and PHP scripting. I am having difficulty scripting a form in PHP that allows selection of multiple checkboxes. The only one that comes through is the last checkbox selected in the list in the cruise and land section. No selections show in destination, activities or referred field, although they are scripted the same as far as I can tell. However if I put a name in the friend textbox that does show.
I have searched the internet, but nothing seems to work. I have tried checkbox array in form handling. But it still doesn't work. Anyone able to assist me? I appreciate any help.
You can see the form at www.iconfortravel.com/contact.html.
Below is the PHP scripting I am using for the form.
<?php
/* Subject and Email Variables */
$emailSubject = 'Icon For Travel Information Request Form!';
$webMaster = 'judy@iconfortravel.com';
/* Gathering Data Variables */
$emailField = $_POST['email'];
$nameField = $_POST['name'];
$phoneField = $_POST['phone'];
$commentsField = $_POST['comments'];
$newletterField = $_POST['newsletter'];
$favoriteField = $_POST['favorite'];
$cruisesField = $_POST['cruises'];
$preferredField = $_POST['preferred'];
$landField = $_POST['land'];
$destinationsField = $_POST['destinations'];
$activitiesField = $_POST['activities'];
$referredField = $_POST['referred'];
$body = <<<EOD
<br><hr><br>
Email: $email <br>
Name: $name <br>
Phone Number: $phone <br>
Comments: $comments <br>
Newletter: $newsletter <br>
Favorite Vacation: $favorite <br>
Type of Cruise Vacation: $cruises <br>
Preferred Cruise Lines: $preferred <br>
Type of Land Vacation: $land <br>
Destinations of Interest: $destinations <br>
Activities of Interest: $activities <br>
Referred by: $referred <br>
Referred friend: $referredfriend <br>
EOD;
$headers = "From: $email\r\n";
$headers .= "Content-type: text/html\r\n";
$success = mail($webMaster, $emailSubject, $body, $headers);
/* Results rendered as HTML */
$theResults = <<<EOD
<html>
<head>
<title>Icon For Travel -Homepage</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">
<!--
body {
background-color: #31887D;
font-family: Palatino Linotype, Book Antiqua, Palatino, serif
font-size: 18px;
font-style: normal;
line-height: normal;
font-weight: bold;
color: #FFF;
text-decoration: none;
}
body,td,th {
font-size: 18px;
}
-->
</style>
</head><body text="#FFF">
<div>
<div align="left">Thank you for your interest! Your email will be answered very soon!</div>
</div>
</body>
</html>
EOD;
echo "$theResults";
?>
