<?php include('includes/config/config.php'); $query=""; if(!empty($_REQUEST['flex_history_id'])){ $query = " delete from sickness where sickness_id = '".$_REQUEST['flex_history_id']." ' "; if (!$result = @mysqli_query($conn,$query)) { exit(mysqli_error($conn)); echo json_encode("FAILURE"); }else{ echo json_encode("SUCCESS"); } } ?>