August 26th, 2002, 02:15 AM
i have seen many quiz system using javascipt to show user how long they take the quiz.
congratulation, it's only takes 1 minute and 23 second .
i have search in manual on how to do that using time(),
but by echo $used_time it just give me strange result, even i take long time or shor time only result not far range between 01:23-01:35.
any hint are appreciate
August 26th, 2002, 07:42 AM
The code you have found should work, the problem is how you implement that code into your system, simply putting it all into one page will not work because PHP is server side, so the page is called, the code is processed and the results sent back to the browser, try implementing it in the following way:
Now get the user to fill out the quiz etc and send the results to a second page, include in the form a hidden value like so
Then in the page that checks the data of the quiz put the following code:
<INPUT TYPE="HIDDEN" NAME="timestart" VALUE="<?echo $timestart;?>">
That should give you a more accurate reading.
-- SilkySmooth --