Newbie question on creating a countdown

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
deedee815
Forum Newbie
Posts: 3
Joined: Sun Apr 02, 2006 7:39 pm

Newbie question on creating a countdown

Post by deedee815 »

Hello,
I'm trying to learn PHP by reading a book for beginners. As an activity, the book suggests I create the following, but I stumped and confused as to how to create this script. Any help would be greatly appreciated. Thanks!

THE ACTIVITY:
Create a birthday countdown script. Given form input of month, day and year, output a message that tells the user how many days, hours, minutes and seconds until the big day.
User avatar
Ambush Commander
DevNet Master
Posts: 3698
Joined: Mon Oct 25, 2004 9:29 pm
Location: New Jersey, US

Post by Ambush Commander »

Well, it kind of defeats the purpose if we give you code, so...

* research the function date()
* learn about Unix time
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

you might find strtotime() and mktime() useful as well ;)
Post Reply