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

$id = intval($_GET['id']);

$get = mysqli_fetch_assoc(mysqli_query($conn,"SELECT image FROM special_thanks WHERE id='$id'"));

if($get['image']){
    @unlink("../../uploads/special_thanks/".$get['image']);
}

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

header("Location: special_thanks_list.php");
exit;