Solved

Stopping user to return to the previous page

Posted on 2008-10-04
4
188 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

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

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this. Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it i…
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. 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.: (CODE)

635 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