<?php

$id = $_GET['idhapus'];

$datagambar = $koneksi->query("SELECT  guru_foto From tbl_guru WHERE guru_id = '$id'")->fetch_assoc();
$gambar = $datagambar['guru_foto'];

unlink("dist/img/imgguru/" . $gambar);
$koneksi->query("DELETE FROM tbl_guru WHERE guru_id='$id'");

echo "<script>
       alert('Data Berhasil Di Hapus');
       window.location='?page=pages/guru/view'
       </script>";
