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

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

mysql_query("insert into income(id ,purpose,via, camount ,cdate,dt)VALUES (NULL,'$_POST[purpose]','$_POST[via]','$_POST[camount]', '$_POST[cdate]','$dt')");

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