Hello all. I am collecting information via an HTML form that includes checkboxes which posts to a PHP file. An email is then sent to the information collector. All of the text and radio inputs email properly, but the checkboxes stop the page loading and emailing cold, and all I get is a blank page. It's probably something so dreadfully simple. Maybe I just need another pair of eyes seeing my mistake. Any help would be greatfully accepted. Thanks!
Partial HTML Form Code:
Code:
<p>License #:<br>
<input type="text" name="license_no" maxlength="200" size="50"></p>
<p>VIN #:<span class="red">*</span><br>
<input type="text" name="vin" maxlength="200" size="50"></p>
<p>Please check all that apply:<br>
<input type="checkbox" name="2door" value="2-door"> 2-Door<br>
<input type="checkbox" name="4door" value="4-door"> 4-Door<br>
<input type="checkbox" name="stationwagon" value="stationwagon"> Station wagon<br>
<input type="checkbox" name="4wheeldrive" value="4-wheel drive"> 4-wheel drive</p>
Partial Email Code:
Code:
$mail_to = "[email protected]";
$mail_subject = "Email Information";
$mail_body = "License #: ".$license_no."\n";
$mail_body .= "VIN #: ".$vin."\n";
$mail_body .= "2-Door? ".$2door."\n";
$mail_body .= "4-Door? ".$4door."\n";
$mail_body .= "Station wagon? ".$stationwagon."\n";
$mail_body .= "4-wheel drive? ".$4wheeldrive."\n";
$mail_from = "From: ".$email."\nReply-To: ".$mail_from;
if(mail($mail_to, $mail_subject, $mail_body, $mail_from))
echo "<p>Thank you. You should be contacted within three or four business days at the most.</p>";
else echo "<p>Failed to send the e-mail \"$mail_subject\".</p>";