$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&rid=$rid$pw">$unrd New $inbox!</a> \n"; }
correct coding for unread msgs v2
Started on the old forum in October 2010 · view the original in the archive · old links redirect here
celticbhoy wrote: $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&rid=$rid$pw">$unrd New $inbox!</a> \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