I am using the .htaccess file to authenticate users trying to view certain pages on my site. It all works fine but the users will be viewing data from a database and I would like to restrict what each user can see.
My problem is after the login window has appeared and a user enters their username and p/wd how do I retrieve the username or their group so i can then use it to restrict what data they can retrieve from the database?
thanks
$PHP_AUTH_USER $PHP_AUTH_PW
should contain user and password (view phpinfo output > PHP Variables)
EDIT also contained in $_SERVER['PHP_AUTH_USER'], same for the pw
beautiful thanks