I've got a script that counts down to a certain date, the problem I'm having is when the date has past the countdown message still shows, I want it to show another message when the date has past, heres what I've done so far:-
PHP Code:<?php
$day = 30;
$month = 06;
$year = 2007;
$target = mktime(0,0,0,$month,$day,$year);
$days = ($usedtime - ($usedtime % 86400)) / 86400;
$usedtime = $usedtime - ($days * 86400);
$hours = ($usedtime - ($usedtime % 3600)) / 3600;
$usedtime = $usedtime - ($hours * 3600);
$minutes = ($usedtime - ($usedtime % 60)) / 60;
$usedtime = $usedtime - ($minutes * 60);
$seconds = ($usedtime - ($usedtime % 1)) / 1;
if ($day < "0"){
$txt = "This offer has now finished.";
} else {
$txt = "This offer will end in $days days, $hours hours, $minutes minutes, and $seconds seconds.";
}
printf("<font face=\"$font_type\" size=\"$font_size\" >$bolda $txt $boldb</font>");
?>




Reply With Quote