Match Timestamp With Current Date For An Event Calendar
I am having trouble displaying an event on a calendar for its correct date.
This is my code so far:
$timestamp = mktime(0,0,0,$cMonth,1,$cYear);
$maxday = date("t",$timestamp);
$thismonth = getdate ($timestamp);
$startday = $thismonth['wday'];
$queryEvent = "SELECT * FROM myweekevents WHERE date = '$timestamp' ";
$resultEvent = mysql_query($queryEvent);
$rowEvent = mysql_fetch_assoc($resultEvent);
I am not able to display an event's information for its correct date. The
format for a date on my database is Y-M-D. Is that why it is not matching
with the timestamp?
No comments:
Post a Comment