ESH/delete_yearly_budget.php
2024-10-23 18:28:06 +05:30

27 lines
783 B
PHP

<?php
include('includes/config/config.php');
include ('includes/functions.php');
include ('log_entry.php');
error_log ( "Start Printing Request Attributes" );
$requestStr="";
foreach ( $_REQUEST as $key => $value ) {
$requestStr.=$key . " : " . $value . "\n";
error_log ( $key . " : " . $value . "<br />\r\n" );
}
error_log ( "End Printing Request Attributes".$_REQUEST['id'] );
save_log($requestStr,'Manage yearly_budget Item','DELETE','delete_yearly_budget.php');
$query="";
if(!empty($_REQUEST['id'])){
$query = " delete from yearly_budget where `id` = '".$_REQUEST['id']."'";
error_log('delete'.$query);
if (!$result = @mysqli_query($conn,$query)) {
exit(mysqli_error($conn));
echo json_encode("FAILURE");
}else{
echo json_encode("SUCCESS");
}
}
?>