Forums

ASP

This topic is locked

Who is logged in script

Posted 04 Nov 2006 13:12:46
1
has voted
04 Nov 2006 13:12:46 Olivier Florence posted:
Hi,
I am looking to know who is logged in on my site to show on the page, preferrably in ASP JS, does any one know how to do this?
Regards,
Olivier

Replies

Replied 14 Nov 2006 13:18:29
14 Nov 2006 13:18:29 Steve Bedder replied:
Use a session variable.

During the log-in validation, have the users name written to session variable e.g.

Session("username" = Request.Form("UserName"

Then on the page(s) once they have logged in you can use Response.Write(Session("username")

HTH

SteveB

www.stockportcounty.net
XHTML | ASP | SQL 2005 | Access
Replied 15 Nov 2006 22:51:12
15 Nov 2006 22:51:12 Tom Purdum replied:
Oliver,

I'm not sure if posting links is allowed, but I just went through the same thing. I found this site

authors.aspalliance.com/stevesmith/samples/whosoncode.asp

that pretty much solves the problem. The code is a little buggy, so you will have to do some editing to get it to work, but it is up and running for me.
Replied 16 Nov 2006 09:29:43
16 Nov 2006 09:29:43 Olivier Florence replied:
Thank you.
I have just managed to do it on my own using a database and it is working fine, code sents looks handy as well in comparaison to others i have seen on the web.

many thanks
Olivier

Reply to this topic