+ 1

How to create a timer in web page!!

and it should start when user enter the login button and it should stop when user press the logout, the time duration should be recorded !!

12th Oct 2017, 5:03 PM
Deekshith K
Deekshith K - avatar
1 Answer
+ 1
Save in your database or a flat file. When someone logs in, record the time (using time() function in PHP, outputs a time as UNIX format) and after logging out, record another time. The difference between these two numbers is your target (in seconds).
12th Oct 2017, 9:04 PM
$machitgarha
$machitgarha - avatar