<?php
include('../db_connect.php');
$id = mysqli_real_escape_string($db,$_GET['id']);
//$resource = mysqli_query($db,"select * from resources where id= ".$id);
//$r = mysqli_fetch_assoc($resource);
// = "../uploads/images/resources/";
//unlink($dir.'media/'.$r['file']);
//unlink($dir.$r['image']);
mysqli_query($db,"delete from resources where id = ".$id);
header("location:resources.php");
?>