How are timed html forms, like the kind you encounter when doing online tests, properly coded using PHP, MySQL, HTML, CSS and JavaScript? -


In other words, will technology take care of time tracking? Would it be Javascript? I am not aware that such things have to be kept with PHP.

Here I need to complete:

  • I reload many web pages because it is too much an online exam where each page load displays a new question However, the complete form that constitutes an exam is a deadline when the time is over, then in the question the user has not completed the test, he / she can not partially submit the full test and neither Minister on the same day (or however the calendar or date. Between 12/24 hours)), the user can try to finish the whole test again within could return the next day and the time allotted. I know that I've added a lot of details and I only used to show this reference, nevertheless, the main difficulty for me is how the expiration facility will be completed. This, anyway, within a series of pages that create a form that represents an online test, I want to track the time that begins with the first question (a page load) and at the end of the exam Want to be disabled Has anyone ever done this? Do I have any suggestions for this? Any advice to me will be fully appreciated.

If you track time on client-side - it is always valid on server side .

Do not trust the customer himself to validate the time, as stated in the comments, client-side time verification is good for cosmetic features, never for actual verification.

The easiest way to accomplish this is to add a unique token to the form (which is not stupid) on the first navigation. Cookies, or any other type of session management technique that you get from your structure, will be enough.

On the form submission you can validate it in the customer side first and if the time has passed, then actually send the form before sending it. If successful, submit the form, and make sure that you validate the token on processing on the server.


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -