<?php
session_start();
include 'dbc.php';

$userid=$_SESSION['userid'];
$id=$_POST["id"];
$acc_name=$_POST["acc_name"];
$acc_type=$_POST["acc_type"];
$acc_symb=$_POST["acc_symb"];

$dr_bal=$_POST["dr_bal"];
$cr_bal=$_POST["cr_bal"];
	
							$sqlp21="update chartofaccounts set acc_name='$acc_name',acc_type='$acc_type',acc_symb='$acc_symb',dr_bal='$dr_bal',cr_bal='$cr_bal' where id='$id' and user_id='$userid';";
							mysql_query($sqlp21) or die("Error : " . mysql_error());
							
							

/*$sql3 = "Insert into finishbal (id,date,pro_code,pro_name,bal,user_id)values (null,'$today','$pro_code','$pro_name','$stock_in_hand','$userid')";
mysql_query($sql3) or die("Error : " . mysql_error());*/
$Message = "Record saved ";
    header("Location:chartofaccounts_register_report_process.php?Message={$Message}");
/*$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"]);*/

?>


                                                                     
