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

?>