bassplaya4string Posted October 11, 2006 Share Posted October 11, 2006 I created a form with 10 radio buttons, if the user misses one of the buttons after clicking submit, I want an error message to come up. I got it working except the error message always comes up even if they have selected all of the radio buttons....here is my code....can someone please help!?[code]} else {$i = 0;$throw = false;while ($i < 10){$questions[$i] == null;$throw = true;$i++;}if ($throw) {echo "It appears that you missed one of the questions. Please hit the back button and return to the quiz.<br />";} [/code] Quote Link to comment Share on other sites More sharing options...
Jocka Posted October 11, 2006 Share Posted October 11, 2006 you could just do it a different way.. like instead of:$throw = true;use$throw = '1';Thenif($throw == '1'){ echo "Error message";} Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.