PHP mktime() function giving unexpected error
Posted: Thu Jun 11, 2009 4:42 am
Dear All,
Iam Using PHP mktime() function to calculate the date , this function is giving unexpected error , following is the code :
$EXday = date('d', mktime(0,0,0,0, $_POST[eday_en] - $_POST[exdays1], 0));
$EXmonth = date('m', mktime(0,0,0, $_POST[emonth_en], $_POST[eday_en] - $_POST[exdays1], 0));
$EXyear = date('Y', mktime(0,0,0, $_POST[emonth_en] , $_POST[eday_en] - $_POST[exdays1], $_POST[eyear_en]));
Please guide me if I am making any mistake in the above code.
Thank you.
Iam Using PHP mktime() function to calculate the date , this function is giving unexpected error , following is the code :
$EXday = date('d', mktime(0,0,0,0, $_POST[eday_en] - $_POST[exdays1], 0));
$EXmonth = date('m', mktime(0,0,0, $_POST[emonth_en], $_POST[eday_en] - $_POST[exdays1], 0));
$EXyear = date('Y', mktime(0,0,0, $_POST[emonth_en] , $_POST[eday_en] - $_POST[exdays1], $_POST[eyear_en]));
Please guide me if I am making any mistake in the above code.
Thank you.