Session.Abandon() for clearing out timer session variables
Posted on 2004-09-11
1. The session.Abandon() function clears the session variables so they must login again directly after completing the quiz if they want to do anything else in the site (i.e take another quiz, same quiz, look at high scores, anything really......) Clicking on any link will redirect them to the login since there is no login username stored anymore.
How can I only clear the datTimeStart & datTimeFinish session variables and not my other session variables like: username, score, percent score...... It also prevents me from redirecting to another page after quiz is done and using all 8 session variables to write them to the DB. After quiz done, all session variables are empty so I'm writing nothing to the DB.
2. My last obstacle is trying to figure out how to prevent the user from refreshing the page after the results are shown because this will insert the record into the DB again and again. Every time they refresh it inserts the record but I can't redirect when the quiz is done becuase it shows the results with the questions they got wrong and the correct answer so they can spend whatever time they want on the page looking over the questions.