You can also register those as session variables to access them later:
<?
session_start();
session_register("username");
$username = $PHP_AUTH_USER;
?>
From then on, as long as a page has session_start() at the beginning, you can access those session variables. But make sure you have a logout like this to clear the session variables:
<?
//unregister session variables
while (list ($key, $val) = each $HTTP_SESSION_VARS )) {
session_unregister($key);
}
?>