First, let us obtain the security factors taken care of. I am using simple authentication under Apache for any one-off, internal only use, non-internet connected lan, php web application.
Just how can get I the HTTP authenticated user title in PHP?
I believe that you're following this
$username = $_SERVER['PHP_AUTH_USER']
$password = $_SERVER['PHP_AUTH_PW']
I have used this to show the username from fundamental authentication: