Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Get User Names
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Get User Names

 Post Reply Post Reply
Author
s1mon View Drop Down
Newbie
Newbie


Joined: 28 March 2003
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote s1mon Quote  Post ReplyReply Direct Link To This Post Topic: Get User Names
    Posted: 01 August 2003 at 1:55pm

Hi,

If you have a database with a field saying UserID how can you say who is logged in to your site and display it on a page? like the forums do - i've tried to look but its  abit over my head - is there a way of doing it realy simply?

Back to Top
michael View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 April 2002
Location: United States
Status: Offline
Points: 4670
Post Options Post Options   Thanks (0) Thanks(0)   Quote michael Quote  Post ReplyReply Direct Link To This Post Posted: 01 August 2003 at 2:43pm
You would have to write to something like an active users table if you just want to count logged in users. Simply do an insert to a table, have it updated on every page and if this updates finds users who have a lastupdatetime of let's say 20 min ago, scratch them.
Back to Top
Mart View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 November 2002
Status: Offline
Points: 2304
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mart Quote  Post ReplyReply Direct Link To This Post Posted: 01 August 2003 at 3:21pm

Or you could set a cookie or session on the login page and use something like this:

if not request.cookies("userid") = "" Then

response.write request.cookies("userid")

Else

response.write "You are not logged in!"

End If

Back to Top
pmormr View Drop Down
Senior Member
Senior Member


Joined: 06 January 2003
Location: United States
Status: Offline
Points: 1479
Post Options Post Options   Thanks (0) Thanks(0)   Quote pmormr Quote  Post ReplyReply Direct Link To This Post Posted: 01 August 2003 at 5:52pm

use the user counter on this site as an example, just modify that code to add to a database instead of incrementing an integer

Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.