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! Link to comment https://forums.phpfreaks.com/topic/222567-easy-countdown-timer/ 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? Link to comment https://forums.phpfreaks.com/topic/222567-easy-countdown-timer/#findComment-1151049 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. Link to comment https://forums.phpfreaks.com/topic/222567-easy-countdown-timer/#findComment-1151050 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! Link to comment https://forums.phpfreaks.com/topic/222567-easy-countdown-timer/#findComment-1151067 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.