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

date_default_timezone_set("Asia/Karachi");
$today=date("Y-m-d");
$month = date("m",strtotime($today));
		$year = date("Y",strtotime($today));
		 $month_name = date("F", mktime(0, 0, 0, $month, 10));
		 $my=$month_name . " " . $year;
		 
$userid=$_SESSION["userid"];
$typename=$_POST["typename"];

$subtypename=$_POST["subtypename"];
$accountname=$_POST["accountname"];
//echo $accountname;

$sql = "Insert into chartofaccounts (id,date,month_name,acc_name,acc_type,user_id,acc_symb) values (null,'$today','$my','$accountname','$typename','$userid','$subtypename')";
$conn->query($sql);

header("location:Add_Final_Account_Name.php");

?>
