php - Match Timestamp With Current Date For An Event Calendar -
i having trouble displaying event on calendar correct date.
this code far:
$timestamp = mktime(0,0,0,$cmonth,1,$cyear); $maxday = date("t",$timestamp); $thismonth = getdate ($timestamp); $startday = $thismonth['wday']; $queryevent = "select * myweekevents date = '$timestamp' "; $resultevent = mysql_query($queryevent); $rowevent = mysql_fetch_assoc($resultevent);
i not able display event's information correct date. format date on database y-m-d. why not matching timestamp?
mktime(0,0,0,$cmonth,1,$cyear);
returns raw timestamp value means of number.
please format date this:
$rawtime = mktime(0,0,0,$cmonth,1,$cyear); $timestamp = date( "y-m-d", $rawtime );
Comments
Post a Comment