Now: I'm not trying to be really imaginative and make this test highly user-friendly. The questions (with ID) for each test are stored in a view created at run-time. These questions will be displayed from, say 1 to 20, through Back and Next buttons and will be multiple choice (one answer only).
What I have come up with: I could make the program go to the database everytime the user clicks on the Next button and randomly select a question from the view that has not already been answered. But that would not let me get back the same question when the user clicks on the Back button.
Help: I know that implementing what I want would be more complex (and involves more logic) than I can think of right now. Could someone give me a direction to go for me so I can figure this out?