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] Link to comment https://forums.phpfreaks.com/topic/23695-help-with-error-report/ 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";} Link to comment https://forums.phpfreaks.com/topic/23695-help-with-error-report/#findComment-107578 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.