<?php
include('../headertop.php');
include('../db.php');
//include('../datepicker.php');

$disp = '';
$pagetitle = 'Delete Expense';

date_default_timezone_set('Asia/Kolkata');

if(!isset($_REQUEST['id']))
{
echo '<meta http-equiv="refresh" content="0;URL=dailyexpense.php?sm=Select an expense first to delete it">';
exit;
}

$id = $_REQUEST['id'];

$date =  $_REQUEST['date'];
$date2 = $_REQUEST['date2'];
$project = $_REQUEST['project'];
$work_type = $_REQUEST['work_type'];

$q = "delete from expenses where id='$id'";
mysqli_query($dbcon,$q) or die(mysqli_error($dbcon));

$sm = "Expense information deleted ";

echo '<meta http-equiv="refresh" content="0;URL=viewexpenses.php?date='.$date.'&date2='.$date2.'&project='.$project.'&work_type='.$work_type.'&sm='.$sm.'">';



