<?php 
session_start();
include 'dbc.php';
$userid=$_SESSION["userid"];
$id=$_POST["id"];

$date=$_POST["date"];
$amount=$_POST["amount"];
$discription=$_POST["disc"];
$acc_name_dr=$_POST["acc_name_dr"];
$sql = "update expense_voucher set 
 date='$date',discription='$discription',amount='$amount' where id='$id'";
$conn->query($sql);

$sql1 = "update acc_ledger set 
 date='$date',discription='$discription',dr_amount='$amount' where tr_no='$id' and acc_name='$acc_name_dr'";
$conn->query($sql1);

//mysql_query($sql) or die("Error : " . mysql_error());



header("location:Voucher_Entry.php");

/*$sql="Select * from agents where userid='$user_id'";
$data=mysql_query($sql) or die ("Error:" . mysql_error());
$userdata=mysql_fetch_array($data);
$email=$userdata["e_mail"];
mail($email . ",info@lalburj.com","Candidate Information","Candidate Data Posted Successfully","Passport No:" . $app_pp_no . " of " . $app_name . "Has been Posted Successfully By:" . $_SESSION["userid"]);*/
?>
