What you could do, is get the current time stamp using time() or date() and
create a sesion variable with this value, when they login (and the session
is created. Then when they logout, and the sesion is destoyed get the
current time stamp again and minus it from the start time.
Note: This requires the user to login and logout, if they just close the
browser then they will never get to your logour script, thus you can't
calculate their money owed.
Stephen Craton [EMAIL PROTECTED] wrote in message
004e01c2d11a$0e3a4590$0200a8c0@melchior">news:004e01c2d11a$0e3a4590$0200a8c0@melchior...
Got a quick and easy question that I'm not sure about. What I need to do
is
calculate how long someone has been in a chatroom, then update a members
table to add some money to their account. Something like this:
For every hour they're in the chatroom: 5 cents
Thanks,
Stephen Craton
http://www.melchior.us
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php