<?php

include '../config/koneksi.php';
include '../session.php';

if($_SESSION['role'] != 'admin'){
    die("Akses ditolak");
}

$id = (int)$_GET['id'];

mysqli_query(
    $conn,
    "DELETE FROM mod_harian
     WHERE id_mod='$id'"
);

header("Location: mod_harian.php");
exit;