<?php
header('Content-Type: application/json; charset=utf-8');

session_start();
include("dbConfig.php");

if($_REQUEST['action_type']=='insurence') {
    
    // $schoolname = $_REQUEST['sn'];
    $insuBillno = $_REQUEST['insuBillno'];
   
    $studentEntryQury = "DELETE FROM `BillParticulars` WHERE `BillNo`='$insuBillno'";
    
    if ($db->query($studentEntryQury) === TRUE) {
        $sql2 = "DELETE FROM `Bill` WHERE `BillNo`='$insuBillno'";
        if ($db->query($sql2) === TRUE) {
            $result = "Record Deleted";
        }
    } else {
        $result = "Error Please Check";
    }
    
    echo json_encode($result);
}

?>