i adjusted it slightly one less line of code and shows a different message if username not found instead of viewing main index.
PHP Code:
case 'getinfo':
$userid = explode("=", $userinfo[location]);
$username=$DB_site->query_first("SELECT username FROM user WHERE userid='$userid[3]'");
if (!$username[username]) {
$userinfo[where] = "Viewing Profile of a Forum Member";
} else {
$userinfo[where] = "Viewing Profile of <a href='member.php?s=$session[sessionhash]&action=getinfo&userid=$userid[3]'>$username[username]</a>";
}
break;
No real difference just one less line of code.