Time question
Posted: Mon Jul 21, 2003 7:04 pm
I was able to define:
$start_time = time();
On the first page to record time, then added this into a hidden field then on the next page I have:
$end_time = time();
I also have:
$duration = $start_time - $end_time;
$duration = date('m:s',$duration);
echoing $duration on the page doesn't give the desired result. Is there something else I should be doing to make the subtraction correct?
I know I should be using a javascript, but this should be simple enough to record the duration in an untimed quiz.
Thanks for your help.
$start_time = time();
On the first page to record time, then added this into a hidden field then on the next page I have:
$end_time = time();
I also have:
$duration = $start_time - $end_time;
$duration = date('m:s',$duration);
echoing $duration on the page doesn't give the desired result. Is there something else I should be doing to make the subtraction correct?
I know I should be using a javascript, but this should be simple enough to record the duration in an untimed quiz.
Thanks for your help.