<?php
include('dashboard.php');
require_once('dbconnection.php');

if(isset($_GET['did'])){
 
    $d_id = $_GET['did'];
    echo"$d_id";
    if($d_id != "")
{
    $delete = "DELETE FROM customer_detail WHERE id = '$d_id'";
    $result = mysqli_query($con, $delete);

        if ($result) {
?>
            <script>
                alert("Customer delete successfully");
                window.location = "customer_view.php";
            </script>
<?php
        } else {
            $errorMsg = "Error: " . mysqli_error($con);
        }
    
}  
}
?>