Hi there!
I have a form all done out in php, the bit Im havin probs with goes like this:
<?php....other vars
$checkboxval = $HTTP_POST_VARS["checkboxval"];
$form = "other values";
$form .= "other values";
$form .= "other values";
$form.="<label for=\"checkbox\">I would like to recieve regular email updates on the following:</label><br /><br />";
$form.="<label for=\"checkbox\">Accommodation: </label>";
$form.="<input type=\"checkbox\" value=\"accommodation\" name=\"checkboxval[accomodation]\" /><br /><br />";
$form.="<label for=\"checkbox\">Banqueting: </label>";
$form.="<input type=\"checkbox\" value=\banqueting\" name=\"checkboxval[]\" /><br /><br />";
$form.="<label for=\"checkbox\">Conferences: </label>";
$form.="<input type=\"checkbox\" value=\"conferences\" name=\"checkboxval[]\" /><br /><br />";
// then checking inputs
if(!$checkboxval) {
$error.="- Please select area/areas on which you would like to receive information<br /><br />";
$valid = false;
}
// other checks etc
// sending details
$sendto = 'mail address';
$about = "query";
$msg = "values";
$msg .= "other values";
$msg .= "Areas to receive information on: $checkboxval \r\n"; // this seems to be my problem area?
$headers = "From: $email \r\n";
if(mail($sendto, $about, $msg, $headers)); {
echo("Thank you for your submission $name $surname.");
echo("<br /><br /><a href='email.php'>← back</a><br /><br />");
}
}
to this point the form works fine. The form sends with no errors. Then I post it and in my email inbox, the email says:
First Name: ss
Surname: sss
Title: Array
Country of Residence: sssss
Confirmed Email Address: rach@rach.com
Areas to receive information on: Array
- I think I might have an idea why, but I don'y know how to fix it! I've tried a few options, but nothing is working...As you can see, I have the same problem with the drop down selection menu!
Please help!
Many thanks in advance
rach