<?php
include "../config/koneksi.php";

$id = $_GET['id'];
$data = mysqli_fetch_array(mysqli_query($conn,"SELECT * FROM galeri WHERE id='$id'"));

unlink("../assets/galeri/".$data['nama_file']);
mysqli_query($conn,"DELETE FROM galeri WHERE id='$id'");

header("Location: upload_galeri.php");
?>