This will not do anything:
Code:
$sql = @mysql_query("SELECT username FROM user WHERE userid=$userid");
while ($row = @mysql_fetch_array($sql)){
$name = $row['username'];
$icon = $row['icon'];
$color = $row['color'];
}
You have a select statement that selects the username. That is all. There is no such thing as $row['color'] or $row['icon']. And, before you go think you can just add icon and color to the select statement, take a look at your user table - do you see those fields there? Nope. So, what are you trying to grab?