Results 1 to 3 of 3

Thread: online list

  1. #1
    Join Date
    Feb 2007
    Location
    Earth
    Posts
    133
    Thanks
    6
    Thanked 1 Time in 1 Post

    Default online list

    how could i make an online list with what i have?
    i could make a file with the online people, but if they dont click logout, they wont be taken off the list...
    anyone got any example? ill give my layout to check if they are logged in

    PHP Code:
    <?php

    //checks cookies to make sure they are logged in 
    if(isset($_COOKIE['ID_my_site'])) 

    $username $_COOKIE['ID_my_site']; 
    $pass $_COOKIE['Key_my_site']; 
    $check mysql_query("SELECT * FROM users WHERE username = '$username'")or die(mysql_error()); 
    while(
    $info mysql_fetch_array$check )) 


    //if the cookie has the wrong password, they are taken to the login page 
    if ($pass != $info['password']) 
    header("Location: login.php"); 


    //otherwise they are shown the member area 
    else 




    else 

    //if no cookie then show this 
    {
    }
    ?>
    http://www.insanecombat.com << bored? check out ma game

  2. #2
    Join Date
    Feb 2007
    Posts
    601
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Just saying since you seem to be very good at PHP but why not simply use something like time to your side eg if the user has no activity then he counts as logged out. Or to use the time to log out the user automatically ?

  3. #3
    Join Date
    Feb 2007
    Location
    Earth
    Posts
    133
    Thanks
    6
    Thanked 1 Time in 1 Post

    Default

    how can i make that happen?
    http://www.insanecombat.com << bored? check out ma game

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
  •