Grow your CSS skills. Land your dream job.

make time for view page !

  • # December 6, 2012 at 4:39 am

    I make online Exams system with php and mysql

    I want to make visitor to see page of exam for certain time for example 30min

    and after 30 min (page die of redirect to main page)

    # December 6, 2012 at 6:29 am

    You could [redirect with JavaScript](http://ntt.cc/2008/01/21/5-ways-to-redirect-url-with-javascript.html “redirect with JavaScript”) but that may be only half a solution as you can always turn JS off.

    If your exams consist of multiple short questions you could store exam start time in a session and show questions one at a time, maybe using AJAX or simply separate pages. On the back end at each question request you check the time elapsed and die if expired. Combine this with a time left timer and a JavaScript redirect to redirect mid way through questions. If JS is off and they submit a question after 30 minutes has passed then you simply discard the answer to that single question. I hope that helps.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".