hi . been playing round with code on index trying to get status icons to show on the online list . been using the male / female part of the code to see if i could replicate the same with status . but failed miserably lol .
//changable sql $sql = "SELECT a.name,a.perm, b.place, b.userid FROM ibwf_users a INNER JOIN ibwf_online b ON a.id = b.userid GROUP BY 1,2 LIMIT $limit_start, $items_per_page "; echo " "; $items = mysql_query($sql); echo mysql_error(); while ($item = mysql_fetch_array($items)) { if($item[1]=='0') { $tit = ""; }if($item[1]=='1') { $tit = ""; }if($item[1]=='2') { $tit = ""; } if($item[1]=='3') { $tit = ""; } if($item[1]=='4') { $tit = ""; }
$sex = mysql_fetch_array(mysql_query("SELECT sex FROM ibwf_users WHERE name='$item[0]'")); if($sex[0]=="M"){$usersex = "<img src="../images/male.gif" alt="(m)"/>";} if($sex[0]=="F"){$usersex = "<img src="../images/female.gif" alt="(f)"/>";} if($sex[0]==""){$usersex = "";} if($item[1]>'0') { $lnk = "$usersex<a href="index.php?action=viewuser&who=$item[3]&sid=$sid">$tit$item[0]$tit</a>"; }else{ $lnk = "$usersex<a href="index.php?action=viewuser&who=$item[3]&sid=$sid">$tit$item[0]$tit</a>"; }
i have changed sql to perm instead of sex and tried different variations .nothing i have done works .
much appreciate anyones help here. btw its wapdesire / lava script .
