jaons
jaons

Reputation: 1

How can I make a countdown timer in PHP?

How can I make a countdown timer in PHP which starts at 40 seconds and counts in this format:

40.59 - 40.48 - 40.47 - etc etc

I also need a button that resets it.

Is this possible in PHP? Do I need to use JavaScript?

Upvotes: 0

Views: 1405

Answers (3)

zzzzBov
zzzzBov

Reputation: 179046

PHP is executed server side; You'll need to use JavaScript or some other client-side language (flash, silverlight, java applet, etc) if you want it displayed to a user in real-time.

Upvotes: 1

Alex K.
Alex K.

Reputation: 175748

You would do this entirely on the client side using Java*script*, there are many examples if you google for javascript countdown, ex http://keith-wood.name/countdown.html.

Upvotes: 2

Related Questions