<?php
include "../config/koneksi.php";

$id = $_GET['id'];
$data = mysqli_fetch_array(mysqli_query($conn,"SELECT * FROM modul WHERE id='$id'"));

unlink("../modul/".$data['nama_file']);
mysqli_query($conn,"DELETE FROM modul WHERE id='$id'");

header("Location: upload_modul.php");
?>