php: randomly picking a variable to display for a week

so i built a random name generator for andy’s site… it’s meant to show a name for one week, when that week is over, a new name will appear.

it’s super manual — every year, he has to run a script that will randomly generate the list for the year

now that i know a little bit more php, i’m wondering if there’s a way to have it randomly choose a name from a database and display that for one week. the “one week” part is the toughest.

surprisingly, i’ve already set up a plugin where he’ll be able to add, remove, edit names easily via the wordpress admin. all the names are in a nice database.

now to display a randomly generated name for a given week… halp?!

One Response to “php: randomly picking a variable to display for a week”

  1. andy says:

    it wasnt just manually running a generator. I also then had to paste that generated list into another file, change a couple of variables, and then I was good to go. Automation (with “bug” fix directions) is always a better thing.

Leave a Reply