php code to send checkbox form results to email
PHP Snippet 1:
$servicetype = implode(",", $_POST['servicetype']);
$mail->body .= $servicetype."\r\n";
PHP Snippet 2:
$servicetype = $_POST['servicetype'];
if(isset($servicetype)) {
$mail->body .= "servicetype: \r\n";
foreach ($servicetype as $selected) {
$mail->body .= " > ".$selected."\r\n";
}
}