okay, I think I put that in the right spot but it seems to have no effect on it. When I output, I still get the following when the checkbox is checked:
Warning: Illegal offset type in /hsphere/local/home/captaint/swiftda.com/buildaboat/SENDMAIL_HTML.php on line 73
And this when it is not:
Warning: Invalid argument supplied for foreach() in /hsphere/local/home/captaint/swiftda.com/buildaboat/SENDMAIL_HTML.php on line 74
Hull Color: 575
My HTML code looks as such:
<input name="hullcolor[]" type="checkbox" value="575" onclick="addUp()">
And my php code looks like this:
<html>
<head>
<title>Sending the Simple Feedback Form – HTML Version</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><style type="text/css">
<!--
body {
background-color: #FFFFFF;
}
-->
</style></head>
<body>
<div align="center">
<table width="728" border="1" cellpadding="0" cellspacing="0" bordercolor="#2A0000">
<tr>
<td width="724"><div align="center"><strong>Thanks for using Canyon Bay's Boat Configurator!</strong> </div></td>
</tr>
<tr>
<td><?php
echo "<p><b>".$_POST["First_Name"]."</b>, here is your configured Canyon Bay!</p>";
echo "<p>We have sent this info to your email address at: <b>".$_POST["EmailFrom"]."</b>.</p>";
echo "<p>You configured a <strong>Canyon Bay 2475</strong></p>";
//Start Engine Type Output Arrays
//E-Tech Engine Array
$engines_array = array("12946" => "<strong>E 150DPXSC</strong> ",
"14348" => "<strong>E 175DPXSC</strong> ",
"15558" => "<strong>E 200DPXSC</strong> ",
"16914" => "<strong>E 200DHXSC</strong> ",
"17276" => "<strong>E 225DPXSC</strong> ",
"18655" => "<strong>E 250DPXSC</strong> ",
"12583" => "<strong>150XL OptiMax</strong> ",
"14616" => "<strong>175XL OptiMax</strong> ",
"16016" => "<strong>200XL OptiMax</strong> ",
"17146" => "<strong>225 XL OptiMax</strong> ",
"19094" => "<strong>225 Pro XS XL OptiMax</strong> ",
"20438" => "<strong>250 Pro XS XL OptiMax</strong> ",
"14905" => "<strong>F150TXR</strong> ",
"19813" => "<strong>F200TXR</strong> ",
"21407" => "<strong>F225TXR</strong> ",
"21866" => "<strong>F250TXR</strong> ",);
$engine_value = $_POST['Engine'];
?>
<br> <br> <?php
//Call Engine Output
echo "Engine Type: " . $engines_array[$engine_value];
echo ".... $<b>".$_POST["Engine"]."</b>.";
//Engine Rigging Array
$riggings_array = array("1117" => "<strong>E-Tech Std Pre-Rig</strong> ",
"1848" => "<strong>E-Tech I-Command Rigging</strong> ",
"2513" => "<strong>E-Tech I-Command Rigging Dlx.</strong> ",
"1200" => "<strong>Mercury Std Pre-Rig</strong> ",
"1800" => "<strong>Mercury Smartcraft Rigging</strong> ",
"2300" => "<strong>Mercury Smartcraft Rigging Dlx.</strong> ",
"1205" => "<strong>Yamaha Std Pre-Rig</strong> ",
"1805" => "<strong>Yamaha Std Digital Rigging</strong> ",
"2305" => "<strong>Yamaha Digital Rigging Dlx.</strong> ",);
$rigging_value = $_POST['Rigging'];
//Call Rigging Output
echo "<p>Rigging Option: " . $riggings_array[$rigging_value];
echo ".... $<b>".$_POST["Rigging"]."</b>.";
//Hull Color Array
$hullcolors_array = array("575" => "<strong>Hull Color</strong> ",);
$hullcolor_value = $_POST['hullcolor'];
}
//Hull Color Output
echo "<p>Hull Color: " .implode(', ', $hullcolor_value)."";
foreach($hullcolor_value AS $hullcolor){
echo $hullcolor."<br /> ";
}
if(empty($hullcolor_value)){
$hullcolor_value = array(" ");
}
//Call Total Price Output
echo "<p>Your Total Amount is $<b>".$_POST["total"]."</b>.</p>";
//start building the mail string
$msg = "<p><strong>Name:</strong> ".$_POST["First_Name"]."</p>";
$msg .= "<p><strong>E-Mail:</strong> ".$_POST["EmailFrom"]."</p>";
$msg .= "<p><strong>Engine:</strong> ".$_POST["Engine"]."</p>";
//set up the mail
$recipient = "";
$subject = "Canyon Bay Configuration";
$mailheaders = "MIME-Version: 1.0\r\n";
$mailheaders .= "Content-type: text/html; charset=ISO-8859-1\r\n";
$mailheaders .= "From: ".$_POST["EmailFrom"]." \n";
$mailheaders .= "Reply-To: ".$_POST["danny@swiftda.com"];
//send the mail
mail($recipient, $subject, $msg, $mailheaders);
?> <br> </td>
</tr>
</table>
<br>
</div>
</body>
</html>
Here is line 71-77 as I think this is where the issue lies:
echo "<p>Hull Color: " .implode(', ', $hullcolor_value)."";
foreach($hullcolor_value AS $hullcolor){
echo $hullcolor."<br /> ";
}
if(empty($hullcolor_value)){
$hullcolor_value = array(" ");
}
thanks again for all your assistance thus far!