i meant to reply to this last night, but i got side tracked.
ok, there are 2 ways you can do this. since php doesn't run client side, then you would have to use javascript if all the questions were on the same page. there are all sorts of inconsistancies you could run into with javascript including someone having it turned off, so here is what i did.
store the array of questions in a session variable.
on the first question, create a $start_time variabe and store that in the session variable
at this point create an "expired_time" variable for when it is too late for them to answer anymore questions.
display one question at a time. before you display the question, test for
PHP Code:
<?
if(time() >= $expired_time){
$header("location: end_quiz.php");
}
?>
or something like that. basically, if their time is up, it just re-directs them to a new page that may calculate their score, or just submit the answers. i don't know if you are grading the quizes in php.