ciao ragazzi mi trovo in una situalizione un po delicata...vi incollo il mio pezzo di codice :

Codice PHP:
if($page=="" || $page<=0)$page=1;
    
$num_items getnumonline(); //changable
    
$items_per_page10;
    
$num_pages ceil($num_items/$items_per_page);
    if(
$page>$num_pages)$page$num_pages;
    
$limit_start = ($page-1)*$items_per_page;

    
//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 
"<p align=\"center\">";
    
$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&amp;who=$item[3]&amp;sid=$sid\">$tit$item[0]$tit</a>";
  }else{
  
$lnk "$usersex<a href=\"index.php?action=viewuser&amp;who=$item[3]&amp;sid=$sid\">$tit$item[0]$tit</a>";
  }
  echo 
"$lnk - $item[2] 
"
;
    }
    
//echo "</p>"; 
vorrei che in tale lista se un utente č femmina il nick compaia rose e blu se maschio...
in piu se un utente dello staff secondo altri colori che non siano rosa e blu...
qualcuno sa dirmi come fare??? tnks