<?php
include("dbConfig.php");
$id = $_POST["id"];

$sql_def = "DELETE FROM def_tb where id='$id'";
$sql_sub_def = "DELETE FROM sub_def_tb where def_id='$id'"; 
    if ($conn->query($sql_def) === TRUE && $conn->query($sql_sub_def) === TRUE) {
        echo 1;
    } else {
      echo "Error: " . $sql . "<br>" . $conn->error;
    }    


?>