Jump to content

Easy: Countdown timer


Thauwa

Recommended Posts

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

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.

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!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.