<?php
include ("connection.php");
$id=$_GET['id'];
$sql="SELECT * FROM `header` WHERE `id`='$id'";
$query=mysqli_query($con,$sql);
$row=mysqli_fetch_assoc($query);
$old=$row['logo'];
// 2nd sql query
$sql1="DELETE FROM `header` WHERE `id`='$id'";
$query1=mysqli_query($con,$sql1);
unlink("./assets/images/slider/" .$old);
if($query1){
    header("location: viewheader.php");
}

?>