Hello there Chris,
I see some nice answers up there at the start of the thread, good stuff—thanks to all for maintaining the quality of our fine community.
That's what I was going to say. Write a class that handles the questioning (if you do OOP) and add a number of questions to it, and then show a random one to the user.
As already mentioned above, with math questions you can generate them on-the-fly and there's no need for hard-coded questions. Downside it that it is very easy to go around it, as Ankerstjerne also mentioned. I can simply write a script that looks at the label (or wherever the numbers are) and calculates the right value and submits the form.
Besides, "real" questions are more fun for the user than math anyway. And thank you for considering this option instead of CAPTCHA—I just hate those letters and numbers that you have to enter over and over because you can't see what the hell they are. :headbang:
Definitely wouldn't recommend yes/no questions, since there's then only two answers for a spammer to deal with. More like "What color is...?" kind of questions would be better. "What is the middle name of William Henry Gates?" — you get my point.
But the bottom line here (literally too) is to circle a bunch of questions around randomly to the user, otherwise it's way too easy to work around and you might as well skip the whole thing.