<?php

$id = $_GET['idhapus'];

$datagambar = $koneksi->query("SELECT  jurusan_foto From tbl_jurusan WHERE jurusan_id = '$id'")->fetch_assoc();
$gambar = $datagambar['jurusan_foto'];

unlink("dist/img/imgjurusan/" . $gambar);
$koneksi->query("DELETE FROM tbl_jurusan WHERE jurusan_id='$id'");

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