<?php
    
    include("../include/config.php");
    
    $redirect_url="https://afsarebrahim.com/admin/news/add-news.php";
    
    $id=$_GET['id'];
    $query="delete from news where `id`='$id'";
    $query_execute=mysqli_query($conn,$query);
    if($query_execute){
        
        
        echo "<script>alert('news deleted successfully')
                   window.open('$redirect_url','_self')</script>";
    }else{
        
        echo "<script>alert('oops something is wrong')window.open('$redirect_url','_self')
        
        </script>";
    }
    
    ?>