Checking for empty radio buttons in Perl
I new to Perl开发者_如何学C and had a question. I have a simple page which allows users to respond to survey questions. There are various question and each has 4 choices. My question is that how do I verify that the user has answered all the question. The radio-group names are populate from the database using an incremental id which is what's confusing me. So say question's choices have the radio-group name "1" and another questions radio-group name is maybe "4". I'm not using the CGI.pm module. Any help will be appreciated. Thank you.
Add a hidden field with a list of question identifiers.
It is generally a bad idea to trust the client for a list of questions.
Just reuse the code you implemented to display the survey. You'll know how you generated the names of the form input fields. Then cycle through all these names and check whether you have a respective HTTP POST field.
For any further questions you need to supply more detailed information on what is your problem.
精彩评论