ughhh this starts 2 b complicated... lol
i dnt wanna b forced as an admin 2 have tht perticular color... i just wanna make tht evry1 cn chose their own fav color....
4 e.g. i made tht row in users table color varchar(7) NOT NULL default '#0000FF',
and i change at my ID tht my nick would b #FF0000
then i put ur code at the main page in inbox like this
$select_db = mysql_select_db($db);
if (!$select_db)
{
echo " No DB " .mysql_error();
}
$sql = "SELECT `color`, `USER` FROM `sw_users` WHERE id='".$uid."' ";
$result = mysql_query($sql);
$row = mysql_fetch_array($result);
$color = $row['color'];
$lnk = "<a href=\"inbox.php?action=readpm&pmid=$item[1]&sid=$sid\">$iml <font color=\"$color\">$item[0]</font></a>";
echo "$lnk
";
but it gives me No DB no database selected ERROR...
then i removed tht db part and more and i get nicknames into other color but not just mine BUT ALL OF THEM..
where i making a mistake???
i want it like this: user register at site, he enter and his nick default color is 4 e.g. blue! then tht user goes 2 c panel and at option change ur color of nickname he chose the color only 4 his nickname,.... so when he save settings we all c his nickname in color he chosed!!!!
i knw how 2 make tht <select> part but not the rest
or try this my friends lse i
//////ALL LISTS SCRIPT <<
if($page=="" || $page<=0)$page=1;
$num_items = getnumonline(); //changable
$items_per_page= 10;
$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 "
";
$items = mysql_query($sql);
echo mysql_error();
while ($item = mysql_fetch_array($items))
{
if($item[1]=='0')
{
$tit = "";
}if($item[1]=='1')
{
$tit = "[M]";
}if($item[1]=='2')
{
$tit = "[A]";
} if($item[1]=='3')
{
$tit = "****";
} if($item[1]=='4')
{
$tit = "[O]";
}
$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">$item[0]$tit</a>";
}else{
$lnk = "$usersex<a href="index.php?action=viewuser&who=$item[3]&sid=$sid">$item[0]$tit</a>";
}
echo "$lnk $item[2]
";
}
echo "
";
echo "
";
if($page>1)
{
$ppage = $page-1;
echo "<a href="index.php?action=online&page=$ppage&sid=$sid">«Prev</a> ";
}
if($page<$num_pages)
{
$npage = $page+1;
echo "<a href="index.php?action=online&page=$npage&sid=$sid">Next»</a>";
}
echo "
$page/$num_pages";
if($num_pages>2)
{
echo getjumper($action, $sid,"index");
}
echo "
";