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

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


$user_ip = getUserIP();


 mysql_query("insert into income(cost_type,pt,amount,cdate,comments,dt ,voucher , pay_methode, chid ,suser,onagof,acc_no,invest,user_ip)VALUES(
'$_POST[cost_type]','$_POST[pt]','$_POST[amount]','$cdate','$_POST[comments]','$dt','$_POST[voucher]','$_POST[pay_methode]','0','$_SESSION[uid]','$_POST[onagof]','$_POST[acc_no]','$_POST[invest]','$user_ip')");

 


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