You need to tell MySQL which user to select. Right now, since you have no WHERE clause in your SQL statement, you are selecting all users and then using the first row in that result set.
PHP Code:
$id = (int)$_GET['id'];
$query = "SELECT id, username, iwins, ilosses, ipoints FROM punbb2_users WHERE id=$id";
Now to make the profile display the proper user, your link would need to look like:
HTML Code:
<a href="profile.php?id=1">Bob's Profile</a>
Just put the user's ID as the value of that GET parameter and you're good to go.
Bookmarks