You basically have it correct already.
while($row = mysql_fetch_array($query)) {
echo "<tr>";
echo "<td>".$row['name']."</td>";
echo "</tr>";
}
Thats doing all the work you need for what you want. Just change whats in the td to include a link (<a href=''>) and pass the users ID as a get variable to a script which will load that users info!