Okay, so this may be a long shot...I'm trying to create a simple online game and I'm wanting to create a php page/function that connects to the mysql server, runs through every account, checking on each 'character' based on time passage (ie if more than 14 hours passed and sleep = 0, then exhausted = 1). Furthermore, I want to track this passage of time based on the users local time. If the character 'sleeps', sleep = 1 and once 8 hours pass, the database will reset exhausted = 0.
Is this possible? I've been searching, but I'm not even sure how to word this right...I'm also open to javascript or another language if someone can point me in the right direction.
Thanks in advance!
I think I've come up with an easier way of accomplishing what I want to do. When the "sleep" button is clicked, the present time stamp will be stored as "sleeptime" and I'll set the "awaketime" for +8hrs (or whatever), storing that time as well. While sleeptime != awaketime 'rest' will continue. I can make certain features unavailable through hidden divs and whatnot, until 'rest' is over.