<?php 
include '../koneksi.php';
$id = $_GET['id'];

mysqli_query($koneksi, "delete from tbl_poli where id_poli='$id'");

$data = mysqli_query($koneksi, "select * from tbl_poli where id_poli='$id'");
while($d=mysqli_fetch_array($data)){
	$id_poli = $d['id_poli'];

	mysqli_query($koneksi,"delete from tbl_poli where id_poli='$id_poli'");
}

mysqli_query($koneksi, "delete from tbl_poli id_poli='$id'");

header("location:poli.php");