All I can tell is that there's a pain of calculating when the user leaves
the site.

Let's say his connection drops. What's then? How do you know he didn't spend
on that page 7 hours?

I think you should have a file included in every page he visits which, using
sessions, adds the TimeStamp to the database.
Then you can see - if session exists means he continues, if not then this is
the first time he is in.
Something like that.
Put all in the database and play with it later-on.

As of the rest, I think you can do it all. The only concern is for you to
accept that his last record is a hit of a page (or log-of button) and not
his closing window.


Sincerely,

 Maxim Maletsky
 Founder, Chief Developer

 PHPBeginner.com (Where PHP Begins)
 [EMAIL PROTECTED]
 www.phpbeginner.com




-----Original Message-----
From: Ng Kok Chun [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 13, 2001 5:11 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED];
[EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED];
"mailto:webmaster"@dark-library.com; [EMAIL PROTECTED]
Subject: [PHP] Time in php problem....


hi... i need some help...

currently i doing web base programming ( econsultant )using php, apache and
mysql as well... now i facing a problem which i need :
1) get time when consultant log on
2) get time when consultant log off
3) calculate how long for the specified consultant been log on to the web
4) accumulate all the time everyday
5) then multiple accumulate with working rate ( X ).
6.) finally output to web ( html form )

pls help !
thanks !


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to