I think I understand what you are asking - if my answer doesn't help, please post more specifics.
The normal way to do what you are asking is to pass some values through a session variable or throught the URL that tell the destination page what action to take.
For example, the link could be:
mysite.com/detail.php?action=post&uid=somename
Then detail php would check the value of the variables and take some action:
if ($action=='post'){
require_once ('post.php');
} elseif ($action=='retrieve') {
require_once ('retrieve.php')
} else {
require_once ('default.php')
}