You'd probably build a script that takes in the question ID to ask (as a post) and then displays that question.
Your script would check to see if an answer was passed and record that information, I'd suggest that you record the information in the database (that's what it's best at doing). Since your users should have to login to get access to the questions you can store there answers based on the userid.
If you script is called without a question id, you would display the first question, and if it had a question id but no answer you could force the user to answer the previous question first.
I'd guess that you'd have a form that holds the current question id, next question id, and answers that would get submitted.