Merhaba yarım kaldı

devamını getiremedim yardımcı olabilir misiniz.?
Veritabanından gelen verileri seçerek kayıtlı mail adreslerine tek tek veya toplu PHPMAILLER ile mail atmak istiyorum. checkbox ile tümünü seçip veya tek tek seçip atmak istiyorum.
id, isim, soyisim ve mail adresi
(1, Ahmet, Kalaycıoğlu,
ahmet@gmail.com)
(2, Ali, Bayrak,
ali@gmail.com)
(3, Sema, Yılmaz,
sema@gmail.com)
anasayfa.php <?php
$baglanti = new mysqli("localhost", "user", "sifre", "veritabani_adi");
if ($baglanti->connect_errno > 0) {
die("<b>Bağlantı Hatası:</b> " .
$baglanti->connect_error);}//echo "MySQL bağlantısı başarıyla gerçekleştirildi.";?>
<form name="formName" action="mail_gonder.php">
<table>
<thead>
<tr>
<th><input type="checkbox" name="all" value="" onclick="selectAll('formName')" /></th>
<th>AD</th>
<th>SOYAD</th>
<th>MAIL</th>
</tr>
</thead>
<?php$sorgu = $baglanti->query("SELECT * FROM kayitlar");
while ($cikti = $sorgu->fetch_array()) {?>
<tbody>
<tr>
<td><input type="checkbox" name="sec" value="<?php echo $cikti[0] ?>" /></td>
<td><input type="text" name="isim[]" value="<?php echo $cikti[1] ?>"></td>
<td><input type="text" name="isim[]" value="<?php echo $cikti[2] ?>"></td>
<td><input type="text" name="isim[]" value="<?php echo $cikti[3] ?>"></td>
</tr>
</tbody>
<?php } ?>
</table> <br>
<input type="submit" value="SEND"></form>
<script type="text/javascript">function selectAll(formName) {
var selectName = document.formName.sec;
var checkNumber = selectName.length;
if (document.formName.all.checked == false) {
for (i = 0; i < checkNumber; i++) {
selectName[i].checked = false;
} } else {
for (i = 0; i < checkNumber; i++) {
selectName[i].checked = true; } }}
</script>mail_gonder.php $gelen=$_POST['isim'];
foreach($gelen as $deger){ [
echo $deger."<br>";
}
print_r($_POST)
$id = addslashes(strip_tags(@$_GET['id']));
$adi = addslashes(strip_tags(@@$_GET['ad']));
$soyadi = addslashes(strip_tags(@@$_GET['soyad']));
$mail_adresi = addslashes(strip_tags(@@$_GET['mail']));
require("class.phpmailer.php");
$mail = new PHPMailer();
$mail->IsSMTP();
$mail->SMTPDebug = 1;
$mail->SMTPAuth = true;
$mail->SMTPSecure = 'ssl';
$mail->Host = "smtp.gmail.com";
$mail->Port = 465; $mail->IsHTML(true);
$mail->SetLanguage("tr", "phpmailer/language");
$mail->CharSet ="utf-8";
$mail->Username = "gonderen@gmail.com";
$mail->Password = "gonderen_sifre";
$mail->SetFrom("gonderen@gmail.com", "bilgileriniz");
$mail->AddAddress("ahmet@gmail.com");
$mail->Subject = "Kayıtlı mail adresiniz.";
$mail->Body = "Sayın, <b>$adi $soyadi</b>
<br><br>Kayıtlı mail adresiniz $mail_adresi ";
if(!$mail->Send()){
echo "no";
} else {
echo "yes";
}}?>