is there any way to save a timer in a database?
I'm a beginner.
I have a timer and progress bars for each 开发者_如何学Goitem in a list. Bars progress sequentially. It runs whenever I load the page. I used cookies to make the timer stop from another page. But I want to keep the timer running even after closing the page.
I've thought of using a database to save the current time whenever someone accesses the page. So what I thought would happen is, the program will access the database whenever it opens the page then checks the saved time in the database and compare it to the current time to compute for the time elapsed and to be able to display how many progress bars should have finished progressing. But I don't know if this is a good idea. I bet not.
Is there any other way to implement this? Thank you. :D
Store the starttime or enddtime. Based on just that you can determine how much time is left.
精彩评论