need help widh comparing dates

From: Date: Fri, 04 Apr 2003 09:21:00 +0000
Subject: need help widh comparing dates
Groups: php.general 
Request: Send a blank email to php-general+get-142271@lists.php.net to get a copy of this message
I need to compare dates which opens commenting system. For example: If show starts 2003.05.01 20:00 then I need that only from that date and time the commenting system apears on my site ant would be there all the time from the start of the show. But in my code the commenting system opens only for one hour, take a look: ------------------------- $year_now = date("Y",$timelt); $month_now = date("m",$timelt); $day_now = date("d",$timelt); $hour_now = date("H",$timelt); $minute_now = date("i",$timelt); $year_show = $row['year']; $month_show = $row['month']; $day_show = $row['day']; $hour_show = $row['hour']; $minute_show = $row['minute']; if ($year_now >= $year_show && $month_now >= $month_show && $day_now && $day_show $hour_now = $hour_show && $minute_now >= $minute_show) { COMMENTING SYSTEM OPENED { else { COMMENTING SYSTEM CLOSED } ------------------------- What SOLUTION would solve the problem?

« previous php.general (#142271) next »