javascript - How best should I keep track of a timer between page requests? -


I am writing a web app in PHP that takes fake exams to users (multiple choice questions).

Examinations take place from time to time, for example, for 30 minutes, I am not sure how long the user has left to complete his exam, what is the best way to keep track of it? Each question is drawn from a MySQL database and the user is served as a new page.

Should I start a timer on the first page with javascript (like setInterval) and whenever any question has been submitted before retrieving the next page? Is there any more elegant or efficient way to do this?

Create a table that stores the user in the examination Association and when the test is no longer valid there At one time it will be allowed to inquire and find out what the time is left to the students, as well as people will not be allowed to lock in the examination if this is not allowed.


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -