Link to home
Start Free TrialLog in
Avatar of Erikal
Erikal

asked on

Stopping user to return to the previous page

Hi,
I am working on an online assessment test:
3 test pages, with form inputs (multiple choice). Tests taken one after the other (English, Maths and Science). The users sing in and login before they can start the tests.
Is there any way to stop the user to go back to the test page they have completed and left, without restricting their access to the test pages not yet accessed.
ASKER CERTIFIED SOLUTION
Avatar of hielo
hielo
Flag of Wallis and Futuna image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
In addition to storing tracks in DB and sessions you can set cookies to prevent logging same page from other browsers.
I think easiest way would be if you set a complete field in you mysql db for English, Math and Science. When the user finish the test, make sure your mysql db gets updated. you can send a hidden value on update to mysql.
ok so then how to prevent the users going back? Put a check on each of your page at the top
something like this

if($row["complete"]==1) {
// redirect them
} else
{
//your test
}

hope this helps
Avatar of Erikal
Erikal

ASKER

Thank you very much. You have been a fantastic help.