<?php session_start(); include("config.php");

$cdate=dtformat($_POST[cdate]);
$cdate2=dtformat($_POST[cdate2]);

$a=substr("$cdate",0,4);
$b=substr("$cdate",5,2);
$dt=$a.$b;

	
mysql_query("insert into pr(cost_type,pt,amount,cdate,comments,dt ,voucher , pay_methode, chid ,datetime1,suser,onagof,acc_no,cdate2,npcom)VALUES(
'$_POST[cost_type]','$_POST[pt]','$_POST[amount]','$cdate','$_POST[comments]','$dt','$_POST[voucher]','$_POST[pay_methode]','$auto_increment','$datetime1ah','$_SESSION[invcox]','$_POST[onagof]','$_POST[acc_no]','$cdate2','$_POST[npcom]')");


header("location:payable.php");
?>