Way to get user name logged in with htaccess?
Posted: Thu Sep 22, 2005 1:28 pm
I am new to PHP, please forgive me if this is a dumb question.. I have searched php.net and various php faqs and haven't been able to find this information...
I have a directory that contains all the admin scripts for my site. Currently it is protected by an htaccess file, which allows access to 2 different admins.
What I would like to do is determine, in PHP code, which admin is logged in--not for authentication, but so that they won't have to then select their user name from a combo box in order for PHP to know who is logged in (after they already entered username and password for htaccess). I've looked at $SESSION[] array but haven't had much luck.
Is this possible?
I have a directory that contains all the admin scripts for my site. Currently it is protected by an htaccess file, which allows access to 2 different admins.
What I would like to do is determine, in PHP code, which admin is logged in--not for authentication, but so that they won't have to then select their user name from a combo box in order for PHP to know who is logged in (after they already entered username and password for htaccess). I've looked at $SESSION[] array but haven't had much luck.
Is this possible?