Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2007
    Location
    Italy
    Posts
    50
    Tokens
    0

    Default User System-Help

    I was Testing this User System and i was trying to add the online users but without success, i made the total user script and it works great but for the online nothing..could someone plz help me??

    PHP Code:
    <?php
    ob_start
    ();
    include(
    "config.php");
    $table 'usersystem';//Sets the table name
    $totalusers mysql_num_rows(mysql_query("SELECT id FROM $table"));
    echo 
    "<br /><font size='1' face='Verdana'><b>Utenti Totali:</b> $totalusers</font><br />";// Echoes the total users
    ?>
    this is for the total user online
    if u need else to help me,just ask...
    thanks in advance for helping me out
    It's Based od Techtuts System
    Last edited by gbt91; 06-04-2007 at 07:01 PM.

  2. #2
    Join Date
    Jul 2006
    Location
    Athens
    Posts
    842
    Tokens
    0

    Default

    i would have thoguht the table name would have been something along the lines of
    users_online

    the database would be called usersystem
    PHP Code:
    <?php
    ob_start
    ();
    include(
    "config.php");
    $table 'users_online'//Sets the table name
    $query mysql_query("SELECT * FROM $table") or die("ERROR: ".mysql_error());
    $num mysql_num_rows($query);
    echo 
    "<br /><font size='1' face='Verdana'><b>Utenti Totali:</b> $num</font><br />";// Echoes the total users
    ?>
    Last edited by Drompo; 06-04-2007 at 07:23 PM.


  3. #3
    Join Date
    Mar 2007
    Location
    Italy
    Posts
    50
    Tokens
    0

    Default

    Nice ++++
    And to get thier Username???

  4. #4
    Join Date
    Mar 2007
    Location
    Italy
    Posts
    50
    Tokens
    0

    Default

    Ooppsss.
    trying this code i found out that it shows the total users not the current online users :S:@

  5. #5
    Join Date
    Jul 2006
    Location
    Athens
    Posts
    842
    Tokens
    0

    Default

    PHP Code:
    <?php
    ob_start
    ();
    include(
    "config.php");
    $table 'users_online'//Sets the table name
    $view mysql_query("SELECT * FROM $table") or die ("Error!");
            echo(
    "");
            
    $checkview mysql_num_rows($view);
            while(
    $getview mysql_fetch_array($view))
            {
    echo 
    "<br /><font size='1' face='Verdana'><b>Utenti Totali:</b>{$getuser['username']}&nbsp;</font><br />";
    }
    ?>
    That will display all the users that are online with their usernames


Posting Permissions

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