Jump to content

How would you, create a timed survey or quiz.


k21chrono

Recommended Posts

upon starting the quiz (opening the page or whatever), record a timestamp either in a db, file or session variable.

 

then, upon completion of the quiz, grab a timestamp as well.

 

then, minus the last first timestamp from the last recorded timestamp, and there you go .. the difference would be the total amount time spent taking the quiz.

you can get a timestamp with the time() function.

 

$timeStart = time();

 

When you submit the form on the processing page you could have

$timeEnd = time();

 

obviously you will need to sent the start time to the next page (through a hidden field, a session, save it to a DB, etc.)

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.