Dear All
To conduct online exams
we need to set timer for say 60 minutes or 90 minutes
after this time the user should be logged of fiocrcefully
Please help me for the code in php
Can I use session for this ...
Dear All
To conduct online exams
we need to set timer for say 60 minutes or 90 minutes
after this time the user should be logged of fiocrcefully
Please help me for the code in php
Can I use session for this ...
When you start:
$_SESSION['time'] = time()+(60*60)
Everywhere else:
if ($_SESSION['time'] < time()) {
die ('You\'re too late. Better luck next time.');
} else {
// Let them continue
}
You must also consider javascript in mind. load server time in javascript and manage countdown clock there.
thanks alot for value added help
can I display the count down om user's screen
yes you can
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.