Dunno if this will help, but this worked for me when I needed something like that. I made a link like this:
<a href='profile.php?user=$user'> $user </a>
then when they clicked the link it would take them to another page that I used this line to get thier info form the DB. You could alter it to create the basis of what you need.
<?
$user = $HTTP_GET_VARS['user'];
?>
Thats the line. It pulls the username from the URL and creates it into a variable as if it were submitted via form. Hope it helps.