Thauwa Posted December 24, 2010 Share Posted December 24, 2010 Hey guys. My question is simple. I have a time value of the future, in seconds, that I extract from MySQL. time(); How do I make an interactive countdown timer using it? It should show the numbers ticking away. I tried Javascript, but it doesn't go with the php time layout. Can anyone help me here? Thanks! Quote Link to comment Share on other sites More sharing options...
Thauwa Posted December 24, 2010 Author Share Posted December 24, 2010 Another thing: I want the SERVER's local time to be considered in the countdown. Will php provide a solution? Quote Link to comment Share on other sites More sharing options...
msaz87 Posted December 24, 2010 Share Posted December 24, 2010 You'll need to use javascript in junction with the PHP. Find a simple script where you replace the start and end times with variables... If you use the date function you can pull the server's time and then use strtotime to insert it and the start time (e.g. date("m-d-y")) from the server. Quote Link to comment Share on other sites More sharing options...
Thauwa Posted December 24, 2010 Author Share Posted December 24, 2010 Thanks msaz, I know that its senseless but I specifically wanted to use time(). I already was using what you suggested. Thanks anyway!!! But I think that I found what I wanted right here: http://javascript.about.com/library/blcount1.htm Thanks guys! Quote Link to comment 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.