<?php 	

require_once '../../Server/connection.php';


$valid['success'] = array('success' => false, 'messages' => array());

$expId = $_POST['categoriesId'];

if($expId){

	
 $sql2 = "DELETE FROM expenses WHERE exp_id = {$expId}";
 
 if($conn->query($sql2) === TRUE) {
 	$valid['success'] = true;
	$valid['messages'] = "Expenses is Successfully Deleted";		
 } else {
 	$valid['success'] = false;
 	$valid['messages'] = "Error while Deleting Expenses";
 }
 
 $conn->close();

 echo json_encode($valid);
 

 
}