<?php

require_once("config/configDB.php"); 

$cashno   = stripslashes($_POST['cashno']);
$expensedate   = new DateTime(stripslashes($_POST['expensedate']));
$expensedate   = $expensedate->format('Y-m-d');
$expensetype   = stripslashes($_POST['expensetype']);
$expense   = stripslashes($_POST['expense']);
$expenser   = stripslashes($_POST['expenser']);
//$paymenttype   = stripslashes($_POST['paymenttype']);
//$silverAQUA   = stripslashes($_POST['silverAQUA']);
//$availableAmount   = stripslashes($_POST['availableAmount']);
$amount   = stripslashes($_POST['amount']);
$edit_id   = stripslashes($_POST['edit_id']);

$mode   = stripslashes($_POST['mode']);
$remark   = stripslashes($_POST['remark']);

$sql_update = "UPDATE expense_entry  SET ";
$sql_update .= "cashno='$cashno',";
$sql_update .= "expensedate='$expensedate',";
$sql_update .= "expensetype='$expensetype',";
$sql_update .= "expense='$expense',";
$sql_update .= "expenser='$expenser',";
$sql_update .= "mode='$mode',";
$sql_update .= "remark='$remark',";
//$sql_update .= "paymenttype='$paymenttype',";
//$sql_update .= "silverAQUA='$silverAQUA',";

//$sql_update .= "availableAmount='$availableAmount',";
$sql_update .= "amount='$amount' ";
$sql_update .= "WHERE id='$edit_id' ";

mysqli_query($conn,$sql_update);

header("Location:expenseEntryDashboard.php");

?>