<?php
include('master/config.php');

$id = $_GET['id']; // get id through query string

$del = mysqli_query($conn,"DELETE FROM `add-blog` where id = '$id'"); // delete query

if($del)
{
  //  mysqli_close($db); // Close connection
   header("location:blog.php"); // redirects to all records page
    exit;	
}
else
{
    echo "Error deleting record"; // display error message if not delete
}


?>