How to adjust the send checkbox form in the mail?

<?php 

require_once('phpmailer/PHPMailerAutoload.php');
$mail = new PHPMailer;
$mail->CharSet = 'utf-8';


$tip = $_POST['form[22779]'];
$tip_grunta = $_POST['form[12303]'];
$uroven = $_POST['form[68279]'];
$otvod = $_POST['form[20780]'];
$akcia = $_POST['form[16645]'];
$tel = $_POST['vars[84531]'];


if (empty($_POST["form[60329]"][]))
{
 $skolko = "1-2";
}
elseif (empty($_POST["form[60329]"]))
{
 $skolko = "3-4";
}
elseif (empty($_POST["form[60329]"]))
{
 $skolko = "5-6";
}
elseif (empty($_POST["form[60329]"]))
{
 $skolko = "7-8";
}
elseif (empty($_POST["form[60329]"]))
{
 $skolko = "more than 8";
}

$mail->SMTPDebug = 3; // Enable verbose debug output

$mail->isSMTP(); // Set mailer to use SMTP
$mail->Host = 'smtp.mail.ru'; // Specify main and backup SMTP servers
$mail->SMTPAuth = true; // Enable SMTP authentication
$mail->Username = "; // Your username from the email which will be sent letters
$mail->Password = "; // Your password by email which will be sent letters
$mail->SMTPSecure = 'ssl'; // Enable TLS encryption, `ssl` also accepted
$mail->Port = 465; // TCP port to connect to / this port may differ from other providers

$mail->setFrom('almenov.r@bk.ru'); // from whom will take a letter?
$mail->addAddress('almenov.r.r.i.1.16@gmail.com'); // Someone will leave a letter 
//$mail->addAddress('ellen@example.com'); // Name is optional
//$mail->addReplyTo('info@example.com', 'Information');
//$mail->addCC('cc@example.com');
//$mail->addBCC('bcc@example.com');
//$mail->list('/var/tmp/file.tar.gz'); // Add attachments
//$mail->list('/tmp/image.jpg', 'new.jpg'); // Optional name
$mail->isHTML(true); // Set email format to HTML

$mail->Subject = 'Request from your test site';
$mail->Body = "" .$skolko ;
$mail->AltBody = ";

if(!$mail->send()) {
 echo 'Error';
} else {
 header('location: thank-you.html');
}
?>


<form action="mail.php" method="POST" enctype="multipart/form-data" novalidate><div class="form-info" style="display:none"><input type="hidden" name="p_id" value="365835"><input type="hidden" name="id" value="13"><input type="hidden" name="goal" value=""><textarea name="goal_html">
 <script type="text/javascript">
 var _tmr = window._tmr || (window._tmr = []);
 _tmr.push({ id: "3087039", type: "reachGoal", goal: "skilltolead" });
</script><script type="text/javascript">
 gtag('event', 'conversion', { 'event_category': 'skilltolead', 'event_action': 'otpravlena'});
</script></textarea><input type="hidden" name="name" value="Quiz"><input type="hidden" name="action" value="modal"></div><div class="form-fields-advanced"></div><div class="quiz-steps"><div class="steps-wrapper"><div class="prev step" data-step-id="1" tabindex="1"><div class="step-title">
 How many people live in the house?
 </div><div class="step-fields" data-count="1"><div class="field" data-type="radio" data-is-required=""><div class="form-field form-field-radio-group"><label class="form-field-radio-item"><input type="radio" class="form-field-radio" name="form[60329]"value="1-2" checked="checked"><div class="form-field-radio-content"><span class="form-field-radio-check"></span><span class="form-field-radio-text">1-2</span></div></label><label class="form-field-radio-item"><input type="radio" class="form-field-radio" name="form[603292]"value="3-4"><div class="form-field-radio-content"><span class="form-field-radio-check"></span><span class="form-field-radio-text">3-4</span></div></label><label class="form-field-radio-item"><input type="radio" class="form-field-radio" name="form[603293]"value="5-6"><div class="form-field-radio-content"><span class="form-field-radio-check"></span><span class="form-field-radio-text">5-6</span></div></label><label class="form-field-radio-item"><input type="radio" class="form-field-radio" name="form[603294]"value="7-8"><div class="form-field-radio-content"><span class="form-field-radio-check"></span><span class="form-field-radio-text">7-8</span></div></label><label class="form-field-radio-item"><input type="radio" class="form-field-radio" name="form[603295]"value="more than 8"><div class="form-field-radio-content"><span class="form-field-radio-check"></span><span class="form-field-radio-text">over 8</span></div></label></div><div class="form-field-hidden"><input type="hidden" name="type[60329]"value="radio"><input type="hidden" name="vars[60329]" value="How many people"></div></div></div><div class="quiz-actions"><a class="component-button quiz-prev bordered" data-quiz-action="prev"><div class="btn-content"><span data-lang="quiz.cancel"></span>CANCEL</div></a><a class="component-button quiz-next filled" data-quiz-action="next"><div class="btn-content"><span data-lang="quiz.next"></span>NEXT</div></a></div></div><div class="step" data-step-id="2" tabindex="2"><div class="step-title">
March 20th 20 at 11:28
0 answer

Find more questions by tags PHP