|
|
|
|
![]() ![]() |
Feb 25 2006, 01:57 PM
Post
#1
|
|
|
Super Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 286 Joined: 4-December 05 From: Latvia, Riga Member No.: 15,337 |
I need some help if somebody can help me out please doit
Ok here is the thing - I have an login box (works perfect) and I have MySQL database (works perfect).. Now I need to make thing like a list where shows everyone who is logged on.. But making it I need to use the same MySQl database and the same login box.. Example: when your write tour Login and password and press "Log-in!" opens page where is list of all logged in member.. If there is ant tutorial aor scripts/codes please help me becaus eit's very important.. Big Thanks alredy |
|
|
|
Feb 25 2006, 02:07 PM
Post
#2
|
|
|
Advanced Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 147 Joined: 2-June 05 From: Klass-World Member No.: 7,802 |
you need to write a query to pull the information from the database.
something along the lines of CODE SELECT * FROM "db table" WHERE "column" = 1 Table is the table that has the column which sets the user to Logged in Column is the part that is 1 or 0. This post has been edited by Klass: Feb 25 2006, 02:09 PM |
|
|
|
Feb 25 2006, 04:10 PM
Post
#3
|
|
|
Super Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 286 Joined: 4-December 05 From: Latvia, Riga Member No.: 15,337 |
emm.. I found a tutorial where from database they take user IP adresses and lists them.. Maybe if I change the IP adresses to the Logins then they will show logged in member names not IP.. will it work?
Thanks Klass for the idea and help |
|
|
|
Feb 25 2006, 05:36 PM
Post
#4
|
|
|
A computer once beat me at chess, but it was no match for me at kick boxing. ![]() Group: [MODERATOR] Posts: 4,085 Joined: 24-July 05 From: Linix, DOS and Windows…the good, the bad and the ugly Member No.: 9,787 ![]() |
You need 'something' to track those who are logged in. When they log-out, reset the field accordingly.
Since we can't see your database fields, it is hard to determine whether the database already has something to use for this function. Or whether you would have to add something. Also, what if a User doesn't 'log-out" but simply closes their browser? How would you know if they are still logged in? Some things to consider. |
|
|
|
Feb 26 2006, 12:59 AM
Post
#5
|
|
|
Privileged Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 873 Joined: 30-July 04 Member No.: 246 |
I would suggest storing a timestamp of when the user logs in, updating it every time that user visits a page within your site. Then once they haven't been active for, say, 20 minutes, you mark the session as logged out. IPB uses something along these lines to determine how many users are currently active.
|
|
|
|
Feb 26 2006, 06:29 AM
Post
#6
|
|
|
Super Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 286 Joined: 4-December 05 From: Latvia, Riga Member No.: 15,337 |
Nice idea but where to get script like that Spectre.. because thats what would be perfect for my website
|
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version | Time is now: 13th October 2008 - 05:30 PM |