wsantos Posted November 23, 2007 Share Posted November 23, 2007 Argggg...Any troubleshooting tips as for why I'm getting empty screen on this one if(empty($_REQUEST['StartDate']) || empty($_REQUEST['EndDate']) || compare_date($_REQUEST['StartDate'],$_REQUEST['EndDate'])<0) { $startyear = date("Y"); $startmonth = date("m"); $startday = date("j"); $endyear = date("Y"); $endmonth = date("m"); $endday = date("d"); } else { echo $_REQUEST['StartDate']; // Test $pststartdate = $_REQUEST['StartDate']; $pstenddate = $_REQUEST['EndDate']; list($startmonth, $startday, $startyear) = split('[/.-]', $pststartdate); list($endmonth, $endday, $endyear) = split('[/.-]', $pstenddate); } $starttime = mktime(0,0,0,$startmonth,$startday,$startyear); $endtime = mktime(23,59,59,$endmonth,$endday,$endyear) echo $starttime; //Test <FORM NAME=DATE ACTION="<?php echo $_SERVER['PHP_SELF']; ?>" METHOD=POST> <TABLE ALIGN=CENTER> <TR> <TD> Start Date </TD> <TD> <INPUT ID='calStart_container' NAME='StartDate'> </TD> </TR> <TR> <TD> End Date </TD> <TD> <INPUT ID='calEnd_container' NAME='EndDate'> </TD> </TR> <TR> <TD COLSPAN=2 ALIGN=CENTER> <INPUT TYPE=SUBMIT VALUE=QUERY> </TD> </TR> </TABLE> </FORM> Link to comment https://forums.phpfreaks.com/topic/78597-solved-datetime-arggghhh/ Share on other sites More sharing options...
revraz Posted November 23, 2007 Share Posted November 23, 2007 Missing ; on this line $endtime = mktime(23,59,59,$endmonth,$endday,$endyear) Link to comment https://forums.phpfreaks.com/topic/78597-solved-datetime-arggghhh/#findComment-397699 Share on other sites More sharing options...
wsantos Posted November 23, 2007 Author Share Posted November 23, 2007 Ok...thanks...that solved the initial load. However, Posting a date showed blank screen also. Link to comment https://forums.phpfreaks.com/topic/78597-solved-datetime-arggghhh/#findComment-397703 Share on other sites More sharing options...
wsantos Posted November 23, 2007 Author Share Posted November 23, 2007 if(empty($_REQUEST['StartDate']) || empty($_REQUEST['EndDate'])) { $startyear = date("Y"); $startmonth = date("m"); $startday = date("j"); $endyear = date("Y"); $endmonth = date("m"); $endday = date("d"); $starttime = mktime(0,0,0,$startmonth,$startday,$startyear); $endtime = mktime(23,59,59,$endmonth,$endday,$endyear); } else { echo $_REQUEST['StartDate']; $pststartdate = $_REQUEST['StartDate']; $pstenddate = $_REQUEST['EndDate']; list($startmonth, $startday, $startyear) = split('[/.-]', $pststartdate); list($endmonth, $endday, $endyear) = split('[/.-]', $pstenddate); $starttime = $startyear . "-" . $startmonth . "-" . $startday . " 00:00:00"; $endtime = $endyear . "-" . $endmonth . "-" . $endday . " 23:59:59"; } Link to comment https://forums.phpfreaks.com/topic/78597-solved-datetime-arggghhh/#findComment-397709 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.