Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> Show Users Logged In, Some help needed..
Dawiss
post 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 smile.gif..

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 wink.gif
Go to the top of the page
 
+Quote Post
Klass
post 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
Go to the top of the page
 
+Quote Post
Dawiss
post 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 wink.gif..
Go to the top of the page
 
+Quote Post
jlhaslip
post 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 Icon

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
Spam Patrol



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.
Go to the top of the page
 
+Quote Post
Spectre
post 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.
Go to the top of the page
 
+Quote Post
Dawiss
post 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 wink.gif..
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Visitors Online(9)
  2. Php Sessions(2)
  3. Script: Phpbb Mod, Total Users Registered(1)
  4. Users Online Script In Php(7)
  5. Adding Users To Databases Using Phpmyadmin(2)
  6. php header() function help needed(4)
  7. Script That Tracks The User Status(4)
  8. Help Needed With Silly Error(8)
  9. A Very Simple Album Problem, Help Needed.(3)
  10. Php - Fsockopen, Get, Etc - Help Needed(1)
  11. Help Needed With Directory/file Listing Code Infinite Loop(5)
  12. Add Users On Email Program With Php?(1)
  13. Php Help Needed Including File In A Page.(2)
  14. Ipetsite Related Programming Help Needed(0)
  15. Creatting A Playlist Through Php(5)
  1. Wamp Packages Needed To Test Scripts(1)
  2. Slaed Cms(2)
  3. Php Code(15)
  4. Php Code Needed(5)
  5. Looking For Command Line Based Sql Modification(1)
  6. Php Code Needed Iii(10)
  7. Tools Needed!(9)
  8. Admin Page(4)
  9. Tutorial Needed?!(11)
  10. How To Print In Php(9)


 



- Lo-Fi Version Time is now: 13th October 2008 - 05:30 PM