27 lines
362 B
PHP
27 lines
362 B
PHP
<?php
|
|
|
|
session_start();
|
|
|
|
if(!isset($_SESSION['role'])){
|
|
|
|
header("Location: ../index.php");
|
|
exit;
|
|
}
|
|
|
|
if($_SESSION['role'] != 'admin'){
|
|
|
|
header("Location: ../index.php");
|
|
exit;
|
|
}
|
|
|
|
include '../config/koneksi.php';
|
|
|
|
$id = intval($_GET['id']);
|
|
|
|
mysqli_query($conn,
|
|
"DELETE FROM rumah_ibadah
|
|
WHERE id='$id'");
|
|
|
|
header("Location: rumah_ibadah.php");
|
|
|
|
?>
|