View Full Version : form question: textbox with only one possible answer

Aug 12th, 2007, 12:07 AM
Hellow everyone, this should be simple, but I'm pretty rusty.

Within a form I'd like to add textbox. I'd like to make it so that the form will show an error unless the correct word is entered into said box, and only one particular word will work.

(Basically, what I'd like to do is create a security image, but instead of an ever-changing image showing a sequence of numbers/letters, of which bots have no trouble hacking, I'd like to show photos of simple animals that the user has to name correctly.)

I'd like to keep this as simple as possible... for myself.

Thank you in advance!

Len Whistler
Aug 12th, 2007, 03:02 AM
You could use php. Below is a rough code and should give you an idea of what to do.

$animal_image = $_POST["animal_image"];

if ($animal_image == cat) {

echo "welcome";
} else {

echo "sorry try again";


Aug 12th, 2007, 03:08 AM
Thank you Len Whistler.

I just found http://www.phpbb.com/community/viewtopic.php?f=1&t=427852 which exactly describes what I wanted to do, so I'm good now.