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!


Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14
  1. #11
    Join Date
    Sep 2006
    Location
    Evanston, Illinois.
    Posts
    2,361
    Tokens
    0

    Latest Awards:

    Default

    try
    PHP Code:
    <?php

    if($logged['in'] === 0){
        
    header("Location: index.php");

    else {
        
    $query mysql_query("SELECT * FROM `private_messages` WHERE `pmto` = '$sess_username'");
        
    $pm_count mysql_num_rows($query);
        
    $today date("m.d.Y");
        
    $yesterday mktime(000date('m')  , date('d')-1date('y'));
        
    $read mysql_query("SELECT `read` FROM `private_messages` WHERE `pmto` = '$sess_username'");

        while (
    $display mysql_fetch_array($query)){
        if(!
    $pm_count){
            echo 
    'You do not have any messages at this time.';
        }
        else {
                
    $query1 mysql_query("SELECT * FROM `private_messages` WHERE `date` = '$today' AND `pmto` = '$sess_username'") or die(mysql_error());
                if(
    mysql_num_rows($query1) > 0) {
                    echo 
    "<b>Today</b><br />";
                    while(
    $display mysql_fetch_array($query1)) {
                       if(
    $read === 0) { 
                               echo 
    "<b>";
                            echo 
    $display['title']." - ".$display['from'];
                            echo 
    "</b>";
                            echo 
    "<br />"
                        }
                            echo 
    $display['title']." - ".$display['from'];
                            echo 
    "<br />";
                        }
                    }
                 } 
                
    $query2 mysql_query("SELECT * FROM `private_messages` WHERE `date` = '$yesterday' AND `pmto` = '$sess_username'") or die(mysql_error());
                if(
    mysql_num_rows($query2) > 0) {
                    echo 
    "<b>Yesterday</b><br />";
                    while(
    $display1 mysql_fetch_array($query2)) {
                        if(!
    $read) { 
                            echo 
    "<b>";
                            echo 
    $display1['title']." - ".$display1['from'];
                            echo 
    "</b>";
                            echo 
    "<br />"
                        } 
                        else {
                            echo 
    $display1['title']." - ".$display1['from'];
                            echo 
    "<br />";
                        }
                    }
                 }
                
    $query3 mysql_query("SELECT * FROM `private_messages` WHERE `date` != '$today' AND `date` != '$yesterday' AND `pmto` = '$sess_username'") or die(mysql_error());
                 while(
    $display2 mysql_fetch_array($query3)) {
                    if(!
    $read) { 
                        echo 
    "<b>";
                        echo 
    $display2['title']." - ".$display2['from'];
                        echo 
    "</b>";
                        echo 
    "<br />"
                    } 
                    else {
                        echo 
    $display2['title']." - ".$display2['from'];
                        echo 
    "<br />";
                    }    
                }
            }
        }
    }    
    ?>
    It may look pretty to use excessive whitespace, but generally it's only good in certain situations.
    How could this hapen to meeeeeeeeeeeeeee?lol.

  2. #12
    Join Date
    Jul 2008
    Posts
    535
    Tokens
    75

    Default

    It now shows up like this:

    yo - guy
    hey - guy
    yo - guy
    hey - guy

  3. #13
    Join Date
    Jul 2008
    Posts
    535
    Tokens
    75

    Default

    Anybody?

  4. #14
    Join Date
    Sep 2006
    Location
    Evanston, Illinois.
    Posts
    2,361
    Tokens
    0

    Latest Awards:

    Default

    Check your table, maybe the rows are like that.
    How could this hapen to meeeeeeeeeeeeeee?lol.

Page 2 of 2 FirstFirst 12

Posting Permissions

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