View Full Version : How do I create content that changes every 24 hours?

dr gonzo
07-09-2007, 01:34 PM
I'm creating a site for a friend who wants to have a "thought of the day" box. He has given me a large list of thoughts and he wants a different one in the box every 24 hours. How would I do this?

07-09-2007, 03:00 PM
you can do this 2 ways. Javascript or PHP. The javascript version you would hardcode the thoughts of the day into a var and do a rand() on them. this would randomise the display text. You could do a date specific but your going to have to key a thought for every day for this to work?

the other option is basicaly the same as above but you hold the text in a db. A bit over kill for what you want but it would make a good project to get into php