I would create a field in the table for "accepted" or some such value that can be set to either 1 or 0. Then when you are printing the name from the db, grab that value as well...like so:
$result = mysql_query("SELECT * FROM users WHERE userid='$userid'");
$userinfo = mysql_fetch_array($result);
if($userinfo['accepted']){
echo "<font color=\"#0000FF\">";
}else{
echo "<font color=\"#FF0000\">";
}
echo $userinfo['name']."</font>";