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. Quote 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. Quote Link to comment https://forums.phpfreaks.com/topic/164080-countdown/#findComment-865549 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.