a440guy thanks for asking. It would be nice if you can use your code.
*The questions can be one, five, ten or whatever; that depends on the admin. The admin may have only one question this week, or ten questions next week.
*The questions will be multiple choice and a radio buttons.
*The user should not be able to move backward once they submit, so they are not allowed to go back and change their answers.
*Users can skip around and answer questions, but all questions must be answered before submitting.
*Quitting and then coming back the next day to finish it the questionnaire is not necessary, but if it can be done it is a good option.
*Users can not answer one question more than once. may be a cookie or an IP Address track might help. (prefer IP Address)
*Once the user clicks submit, provide the user a result of user's score in percentage, and a result of what other people answered in percentage (This web site is a good example: http://www.planetsourcecod
The problem I am running into is once the user submit, I could not get the questions to insert into the database b/c I believe it is my loop doing some kind of wired things.
Main Topics
Browse All Topics





by: a440guyPosted on 2003-07-21 at 12:25:20ID: 8970157
How many more than two questions? And why two?
That's my shorthand way of pointing out that you need to specify what you want in a whole lot more detail. Will the questions be multiple choice or fill-in-the-blanks? If multiple choice, will they use checkboxes, radio buttons or select and/or multi-select lists? Do you want the user to be able to move forward and backward through the questionnaire or just forward? Are they allowed to go back and change the answers to previously answered questions? Should they be able to skip questions and answer them later? Should they be able to partially answer the questionnaire, quit, and then come back the next day to finish the questionnaire? Should they be prevented from answering the questionnaire more than once?
And what about reporting capabilities? How are you going to score the questionnaire? What reports do you need?
Any questionnaire code "out there" is bound to either be very simple with little or no flexibility, or very specific to a particular need (and possibly complex). I have written a questionnaire "generator" which gives the user the ability to create several kinds of questions. I can't post it, but if that is what you need, you might be able to find a commercially available product.
If what you want is simple, such as three questions per page, with each question containing radio buttons that users select, and users able to move freely between questions, then it's not so difficult that we couldn't solve it here.
finally, it would be interesting to know what problems that you ran into when you tried to write this yourself?