<?php
session_start();
if(!isset($_SESSION['admin'])){
    header("Location: /frozenfood/");
    exit;
}
include 'koneksi.php';

$id = $_GET['id'];

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

echo "<script>alert('Produk berhasil dihapus'); window.location='admin.php';</script>";
?>