Well, you could manually write out the table headers rather than relying upon the database column names. Then during your iteration through the result set, use [man]mysql_fetch_assoc/man to pull the row into an associative array, and you can then use $row['user_name'] or $row['user_email'] to reference values.
As for making the link, without knowing exactly what the profile page is, I'd expect you do something like this:
$result= mysql_query($query);
echo '<table border=1>
<tr>
<th>Name</th>
<th>Email</th>
<th>Class</th>
<th>IP</th>
<th>Banned?</th>
<th>Joined</th>
<th>Rights</th>
</tr>';
while($row = mysql_fetch_assoc($result))
{
echo '
<tr>
<td><a href="profile.php?userid=' . $row['idusers'] . '">' . $row['user_name'] . '</a></td>
<td>' . $row['user_email'] . '</td>
<td>' . $row['user_class'] . '</td>
<td>' . $row['user_ip'] . '</td>
<td>' . $row['user_isbanned'] . '</td>
<td>' . $row['user_datejoined'] . '</td>
<td>' . $row['user_rights'] . '</td>
</tr>';
}
echo '</table>';
Also a side-note. I wouldn't willingly post and md5 hash of a password. md5 hashes are reversible (with enough resources & time, although the time is diminishing). You should either not show the hash (best bet) or even consider upgrading and using [man]sha1/man as your hashing function. It too can be reversed; however, it will take longer. Although you still shouldn't divulge the hash of the password.