<?php



include("../../base.php");



$trans_no = rand(200001,999999);

$ID=$_POST['ID'];

$date=$_POST['date'];

$trans_details = "";

$description=$_POST['description'];

$paid_in=$_POST['paidin'];

$paid_out=$_POST['paidout'];

$trans_status=$_POST['trans_status'];

$code = "";



$sql_code_get = "SELECT * FROM mayis WHERE client_no='$ID'"; 

$uname_info = mysql_fetch_array(mysql_query($sql_code_get)); 

$accno = $uname_info['account_no']; 



$query = "INSERT INTO account (`trans_no`,`client_no`,`date`,`trans_details`,`description`,`paid_in`,`paid_out`,`trans_status`,`code`)

 VALUES ('$trans_no','$ID','$date','$trans_details','$description','$paid_in','$paid_out','$trans_status','$code');";

$insert = mysql_query($query) or die(mysql_error());

mysql_close();





$msg = "Transaction Record Inserted";

header("location: index.php?msg=$msg");

?>