Thursday, March 26, 2009

PHP: Getting the username logged in with .htaccess

If you are using .htaccess Apache Auth and you need to get the name of the logged in user:

echo $_SERVER["REMOTE_USER"];

No comments: