Reply
user login / logout tracking
Old 10-12-2009, 03:31 PM user login / logout tracking
aigb_mcd's Avatar
Experienced Talker

Posts: 39
Trades: 0
I want to track a user's login length and send that number to a database. Can anyone help?
aigb_mcd is offline
Reply With Quote
View Public Profile
 
 
When You Register, These Ads Go Away!
Old 10-12-2009, 03:46 PM Re: user login / logout tracking
chrishirst's Avatar
Super Moderator

Posts: 22,221
Location: Blackpool. UK
Trades: 0
Unless the user actually logs out specifically there is no way to determine how long they were actually logged in.

You could track the session ID and timestamp that, but that will end 20 minutes after the last client/server communication.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Growing old is mandatory - Growing up is optional
Code Samples | People Counting System | Bits & Bobs
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 10-12-2009, 03:48 PM Re: user login / logout tracking
aigb_mcd's Avatar
Experienced Talker

Posts: 39
Trades: 0
hmm,, well yes i would have the user log out. i just need a way to see the time from login to log out.
aigb_mcd is offline
Reply With Quote
View Public Profile
 
Old 10-12-2009, 03:51 PM Re: user login / logout tracking
chrishirst's Avatar
Super Moderator

Posts: 22,221
Location: Blackpool. UK
Trades: 0
yep

store the time they login then deduct that from the time they logout

Use the DateDiff function.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Growing old is mandatory - Growing up is optional
Code Samples | People Counting System | Bits & Bobs
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 10-13-2009, 02:35 AM Re: user login / logout tracking
Skilled Talker

Posts: 91
Name: Sidney shieldon
Trades: 0
Yeah you can do that. The session can be stored for each users or if you add additional features it could provide you detail about login time of each user. In other cases you can just subtract the time they logged in and logged out and get the required result.
infotech rules is offline
Reply With Quote
View Public Profile
 
Old 10-20-2009, 05:59 PM Re: user login / logout tracking
aigb_mcd's Avatar
Experienced Talker

Posts: 39
Trades: 0
what would that code look like?
aigb_mcd is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to user login / logout tracking
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 



Page generated in 0.11830 seconds with 13 queries