<?php
    include("dbcon.php");
	session_start();
	$id=$_GET['id'];
	
	$qry="select `image` from `smo-posters` where id='$id'";
	$sql=mysqli_query($con,$qry);
	$row=mysqli_fetch_array($sql);  
	unlink($row['image']); 
	$res="delete from `smo-posters` where id=$id";
	$r=mysqli_query($con,$res);
	if($r>0)
	{
		header("location:smo-posters.php");
	}
?>