like per page it will show 10 buddies only i tried but i failed and confused so anybody help
Code:
$user = mysql_fetch_assoc($q); $q = @mysql_query("select * from `buddylist` where `test`='$dblogin' and ci='".$ci."' and agreed='1';"); while($man = @mysql_fetch_array($q)) { $rs = @mysql_query("select * from `chat_users` where login='".$man['name']."' and `ltime`>'".intval(time()-$offline)."';"); $d = @mysql_fetch_array($rs); $rr = @mysql_query("select * from `chat_users` where login='".$man['name']."';"); $r = @mysql_fetch_array($rr); echo "".$man['name'].", <a href=\"./user.php?".SID."&nocache=$nocache&room=$room&m=$n&dblogin=".$man['name']."\"><br/>Pm</a>,"; $qr = mysql_fetch_array(mysql_query("SELECT COUNT(`id`) FROM `buddylist` where `name`='".$man['name']."' AND `test`='".$user['login']."' AND ci= '$ci'")); if ($qr[0]!=0) { } else { echo "<a href=\"addbud.php?".SID."&nocache=$nocache&moo=".$man['name']."&rid=$rid&am=z&ap=0\"> Add as Friend</a><br/>"; }
Comment