Forum Moderators: open

Message Too Old, No Replies

how to tell when a user is on/offline with a database

         

Alex_GRIM

7:22 am on Jan 28, 2005 (gmt 0)



ok, i built a website, well a few, but the one i'm asking a question
for is <snip> . i want to add a feature that
will add a database entry to tell that you are online, well that's easy:

*****************************************************************
sub page_load(etc..)

open oledb = "select from tablename.* where uname = '"& request.cookie("cookiename")("username") &"'......etc

update recordset("status") etc...........
*****************************************************************
ok, so now they're officially, "online", lol, but how do they
offiacially go "offline"? you and i both know that noone "loggs off"
anymore, so i can't use that approach. now, i'd be using the page_load
event to log them on, and i could even use that everytime the load a
page, but how would i log them off? iv'e only been doing this for a
couple months, so i don't know all the tools to the trade, and the
tricks in using them, but i was messing with vb6 the other day,
teaching myself how to utilize the timer, very useful, can i use a
time in asp? if so, can i do it with vb script? i don't know java yet,
or c# or c++ or j#, just vb script. like i said, i'm two months old to
this stuff. thanks in advance for your time: ALEX GRIM, WWW.GRIMMUSIC.COM

[edited by: Xoc at 11:46 pm (utc) on Feb. 9, 2005]
[edit reason] no urls [/edit]

tomda

7:35 am on Jan 28, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to Webmaster world Alex_GRIM

Please, before posting read the TOS. URL are not permitted in WWForums. Don't be surprise if the mod will remove it.

Google for following terms "phpfreak count online" and get the 1st result which is a tutorial from a well-known website. It is in PHP but it will give an idea of what you need to do.

Cheers

RossWal

8:35 pm on Jan 28, 2005 (gmt 0)

10+ Year Member



A second welcome Alex! More interesting reading to be found by googling 'iis session object'. Again check the first listing.