<?php 	include('includes/config.php'); ?>
<?php session_start();
$user = $_SESSION['user_name'];
 ?>
 <?php
$id=$_POST['id'];
$date=$_POST['date'];
$time=$_POST['time'];
?>

<?php
 mysql_query("UPDATE expenses SET trash ='1' WHERE exp_id = '$id'") or die(mysql_error());
 
 echo "success";

 mysql_query("INSERT INTO history (`data`,`actions`,`date`,`user`)VALUES('$id', 'deleted expense', '$date $time', '$user')")or die(mysql_error());	

?>