| DIR: /home/islapiiu/sites/thegarder/admin/ |
| Current File : /home/islapiiu/sites/thegarder/admin/delete-album-photo.php |
<?php
include '../db.php';
$image = $_GET['img'];
$file1 = '../images/photo-albums/photos/thumb/' . $image;
$file2 = '../images/photo-albums/photos/' . $image;
unlink($file1);
unlink($file2);
$sql = "DELETE FROM `album-photos` WHERE `photo` = '$image'";
$db = new DB();
if ($db->readQuery($sql)) {
header('Location: ' . $_SERVER['HTTP_REFERER']);
}
|