Look into sessions which maintain registered variables across pages with cookies or by passing the session ID via the URL.
If you simply want to know the username alone (which you probably don't want, since your logon can be bypassed easily) you could simply pass the username via the URL like this:
<?php
print "<a href='$php_self?user=$user'>Reload page with current user</a>";
print "<a href='$php_self'>Forget user</a>";
?>
Your URLs will probably be a little more complex, but I hope this helps you get the idea...
-Rich