Solved

Stopping user to return to the previous page

Posted on 2008-10-04
4
184 Views
Last Modified: 2013-12-12
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.
0
Comment
Question by:Erikal
4 Comments
 
LVL 82

Accepted Solution

by:
hielo earned 500 total points
ID: 22641245
somewhere in your db you should be tracking the responses supplied by specific users. So when a user logs in successfully, obtain a list of the pending tests only and save it to a session variable. So if a user decides to go to "test1" page and that page is NOT in your session variable, then redirect to some other page(perhaps one that will show them the allowed tests they can take).
0
 
LVL 14

Expert Comment

by:ali_kayahan
ID: 22641274
In addition to storing tracks in DB and sessions you can set cookies to prevent logging same page from other browsers.
0
 
LVL 9

Expert Comment

by:syedasimmeesaq
ID: 22641600
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
0
 

Author Closing Comment

by:Erikal
ID: 31503046
Thank you very much. You have been a fantastic help.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
This article discusses four methods for overlaying images in a container on a web page
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now