View file File name : service-photo.php Content :<?php include '../../db.php'; $image = $_GET['img']; $file1 = '../../images/services/gallery/' . $image; $file2 = '../../images/services/gallery/thumb/' . $image; unlink($file1); unlink($file2); $sql = "DELETE FROM `services-photos` WHERE `image_name` = '$image'"; $db = new DB(); if ($db->readQuery($sql)) { header('Location: ' . $_SERVER['HTTP_REFERER']); }