16 lines
425 B
PHP
16 lines
425 B
PHP
<?php
|
|
include 'auth.php';
|
|
if (!isAdminPemerintah()) { header("HTTP/1.1 403 Forbidden"); exit; }
|
|
include 'koneksi.php';
|
|
|
|
if (isset($_GET['id'])) {
|
|
$id = mysqli_real_escape_string($conn, $_GET['id']);
|
|
$query = "DELETE FROM spbu WHERE id='$id'";
|
|
|
|
if (mysqli_query($conn, $query)) {
|
|
header("Location: index.php?status=terhapus");
|
|
} else {
|
|
echo "Gagal menghapus: " . mysqli_error($conn);
|
|
}
|
|
}
|
|
?>
|