Page 1 of 1

Newbie question on creating a countdown

Posted: Sun Apr 02, 2006 7:43 pm
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.

Posted: Sun Apr 02, 2006 8:08 pm
by Ambush Commander
Well, it kind of defeats the purpose if we give you code, so...

* research the function date()
* learn about Unix time

Posted: Sun Apr 02, 2006 8:49 pm
by John Cartwright
you might find strtotime() and mktime() useful as well ;)