<?php
include '../auth.php';
include '../../koneksi.php';

if (isset($_GET['id'])) {
    $id = $_GET['id'];
    
    $query = "DELETE FROM detail_testimoni WHERE id_detail_testimoni = '$id'";
    
    if (mysqli_query($conn, $query)) {
        $_SESSION['success'] = "Data Testimoni berhasil dihapus!";
    } else {
        $_SESSION['error'] = "Gagal menghapus data testimoni!";
    }
    
    header("Location: ../testimoni");
    exit();
}
?>
