Add record in DB after 1 min

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
phpcoder
Forum Contributor
Posts: 158
Joined: Sat Nov 02, 2002 1:18 pm
Location: Manchester, UK

Add record in DB after 1 min

Post by phpcoder »

Hi,
I have a php page where user can solve the puzzle, I want to track the time user spents on solving the puzzle. I wan to add tha data (increment) user time after every 1 mins, so if user is on the page trying to solve puzzle the function should trigger after every 1 min and update user time in db. Any help.
Thanks
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Re: Add record in DB after 1 min

Post by califdon »

You don't want to repeatedly update the database when nothing happens. Store the timestamp when the user starts, then store the timestamp when the user finishes.
Post Reply