SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Zealot
    Join Date
    Jul 2009
    Posts
    152
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Hello friends i need an help for the users logged in

    hello friend i have made an website i need to include show like wheather the user is logged in or not and which all users have logged in also..

    1)i used onunload event but after refrehing twice the user is automatically switching off....i used it for when the browser closed....without logged out..but its echoing like this problem.

    so please give me a step by step advice how to solve this all....

  2. #2
    SitePoint Wizard siteguru's Avatar
    Join Date
    Oct 2002
    Location
    Scotland
    Posts
    3,609
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Use a database to validate member logon

    Use same database to record current logged-on status

    Query the database to get a COUNT of logged-on users, and also the names/IDs/whatever of those logged-on members


    SEEMPLES!
    Ian Anderson
    www.siteguru.co.uk

  3. #3
    SitePoint Zealot
    Join Date
    Jul 2009
    Posts
    152
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hi i am doing according to ur advice thanks for the responce too see i have stucked in the way where after selecting the database and execting the query its displaying only one row how display all the coloum where the staus is one i use select usernamefrom the table where the status is 1 and used mysql_fetch_array where it is displaying only one row ...so how to get the count of all the rows

  4. #4
    SitePoint Wizard bronze trophy
    Join Date
    Jul 2008
    Posts
    5,757
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Do a search for: users online

    You generally update a timestamp each time a user performs an action. Then you can "assume" a user who's been inactive for too long is "offline".

  5. #5
    SitePoint Member netdollar's Avatar
    Join Date
    Oct 2009
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    check out this site to get ur answer http://www.phpfreaks.com/
    Get 1000 visitors for FREE
    Just by placing FREE ads
    http://www.rattenads.com


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •