swamp Posted June 29, 2009 Share Posted June 29, 2009 Hi there Can anyone shed some light on this? I need to have a countdown on a page that runs from a value in a database and then displays a different message. Something like <?php if($row['time_left'] < 0) { echo 'no time left'; } ?> But how would I have it automatically count down? Thanks in advanced. Link to comment https://forums.phpfreaks.com/topic/164080-countdown/ Share on other sites More sharing options...
Adam Posted June 29, 2009 Share Posted June 29, 2009 The best method is not to store how much time is left, but when time's up. That way you keep it a constant value in the database and can just calculate how much time is left. Link to comment https://forums.phpfreaks.com/topic/164080-countdown/#findComment-865549 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.