I'm looki开发者_开发技巧ng for some simple script to display what the title says. Some sort of counter (like a timer) that starts incrementing when the user clicks a button and stops when clicked again or when the page is closed. BUT it has to save the last value to start adding from there when opened again later.
I hope it's not too hard to solve since I am just starting with PHP and Javascript. It is for an art project so any help will be very appreciated. Greetings from Argentina!
For this I'd have a very simple database which stores the last time value and the state of the clock. It can be queried on page load to find out if the counter is on or off and resume from the stored time.
Hope this gives you an idea of what needs to be done. Good luck with the project :).
精彩评论