correct coding for unread msgs v2

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    correct coding for unread msgs v2

    $unreadinbox=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM inbox WHERE unread='1' AND toid='".getuid_sid($sid)."'"));
    $unrd="".$unreadinbox[0]."";
    if($unreadinbox[0]>0){
    $inbox="Inboxes";
    if($unreadinbox[0]==1)$inbox="Inbox";
    $main.="<a href=\"./inbox/inbox.php?sid=$sid&amp;rid=$rid$pw\">$unrd New $inbox!</a><br/>\n";
    }
    Last edited by celticbhoy; 25.10.10, 12:42.

    #2
    Originally posted by celticbhoy View Post
    $unreadinbox=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM inbox WHERE unread='1' AND toid='"$who'"));
    $unrd="".$unreadinbox[0]."";
    if($unreadinbox[0]>0){
    $inbox="Inboxes";
    if($unreadinbox[0]==1)$inbox="Inbox";
    $main.="<a href=\"./inbox/inbox.php?sid=$sid&amp;rid=$rid$pw\">$unrd New $inbox!</a><br/>\n";
    }
    ive just edited ur code in the quote above, copy and paste that to profile, it is an easy code to do as getuid_sid wud be getting ur id, not the person ur lookin for

    Comment

    Working...
    X