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

mysqli_query($koneksi, "delete from tbl_dokter where id_dokter='$id'");

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

	mysqli_query($koneksi,"delete from tbl_dokter where id_dokter='$id_dokter'");
}

mysqli_query($koneksi, "delete from tbl_dokter id_dokter='$id'");

header("location:dokter.php");