<?php
include "../koneksi.php";

if(isset($_POST["butedu"]))
    $kat=$_POST['kat'];
   
    { 
        $cek = count($_POST["cek"]);
        
        if($cek == 0)
        {
            echo "<script>alert('tidak ada data terpilih');location='?page=data_edukasi&kat=$kat'</script>";
        }
        else
        {
            for($i=0; $i < $cek;$i++)
            {
                $ID=$_POST["cek"][$i];
            $hapus=mysql_query("delete from edukasi_anak  where id_edukasi='$ID'");
            }
            if($hapus)
            {
             echo "<script>alert('data berhasil terhapus');location='?page=data_edukasi&kat=$kat'</script>";
            }
            
        }
    }

?>