Code:
if(isset($_REQUEST['submit']))
{
date_default_timezone_set("Asia/Calcutta");
$date = date('d/m/Y');
$in=$_POST['in'];
$out=$_POST['out'];
$project1=$_POST['project1'];
$hrs1=$_POST['hrs1'];
$project2=$_POST['project2'];
$hrs2=$_POST['hrs2'];
$otherremark=$_POST['otherremark'];
$hrs3=$_POST['hrs3'];
$total=$_POST['total'];
$result=mysql_query("INSERT into user_tasksheet(today_date,in,out,project1,hrs1,project2,hrs2,otherremark,total) values('".$date."','$in','$out','$project1','$hrs1','$project2','$hrs2','$otherremark','$hrs3',$total)") or die(mysql_error());
if(mysql_num_rows()==1)
{
echo "insert data";
}
else
{
echo "not insert data";
}
}
else
{
return false;
}
?>
Comment