<?php

$mysqli = new mysqli("localhost", "homecar1_root", "2021wemadeit", "homecar1_cg1");
 
// Check connection
if($mysqli === false){
    die("ERROR: Could not connect. " . $mysqli->connect_error);
}

$exp_id = $_GET['id'];
 
// Attempt delete query execution  

$sql = "DELETE FROM `expenses_master` WHERE `id`='$exp_id'";

if($mysqli->query($sql) === true){
    echo "Record deleted successfully.";
} else{
    echo "ERROR: Could not able to execute $sql. " . $mysqli->error;
}
 
// Close connection
$mysqli->close();
?>