I'll try to explain a bit. I'm not sure how much you know so don't be offended if I go over things you already do know.
You should familiarize yourself with passing variables through the query string. Most forms use the POST method to pass variables from page to page. When submitted, you can access these variables in php through the built in $POST array like $myVar = $POST['form_field_name']. In the same way, you can access variables in the query string using the get method like $myVar = $_GET['some_value'].
In case your wondering, the query string I'm referring to are the attributes appended to the end of the file name in your html links.
Example:
www.mysite.com/mypage.php?var1=foo&var2=bar&debian=best_linux_distro
All of the variables after the ? will be accessible on mypage.php through the $_GET array.
So I can do something like:
$something = $_GET['var1'];
echo $something; //This will echo "foo"
$something_else = $_GET['var2'];
echo $something_else; //This will echo "bar"
And so on.
Now as far as using this information the way you mentioned, I assume whe you run your db query and display usernames in a list, you're using some sort of loop. As you loop through the rows and display the value of the "username" collum or whatever it's name is, you can also pull the value of other collums related to the same record, like "lastPost" or whatever.
Example:
$query = "Select * from myTable";
$result = mysql_query($query);
while $row = mysql_fetch_array($result){
echo '<a href="lastpost.php?username='.$row['username'].'">'.$row['username'].'</a>';
}
So now in lastpost.php you can use $_GET['username'] to run a query and pull the last entry for that user. And since you're looping over your $row array, it will create unique links for each record.
Make sense?