I am trying to create a "find the odd word" application (given a list of words like cat, dog, bird and car, the latter is the odd one because it's not an animal).
Firstly, I retrieve and shuffle randomly five words from the DB. They are called: odd (which is the odd one), one, two, three, four (which are the other four).
Then, I produce a form (radio button) with the five words, so that users can select one of their choice:
$words = array
(
$odd,
$one,
$two,
$three,
$four,
);
shuffle($words);
foreach ($words as $word)
{
$string = $word;
echo '<html><input type="radio" name="odd" value="'.$string.'">'.$string.'<br><br></html>';
}
In the next PHP page, I want to check if the selected word is the odd one. I can't figure out how to do it. Any suggestions? Thanks!