I have succesfully written a PHP function to send HTTP auth. headers and check $PHP_AUTH_USER and $PHP_AUTH_PW against entries in a MySQL DB.
My question is this...
As the function is to be called in every page of a site's "members area" is there an easy way to check whether or not a user has already been authenticated?
I'm trying to do this so that DB access only occurs when a user is authed for the first time as most of the pages are quite DB intensive.
I know I can do this by setting a session variable, but I would like to know if there is another way.
Hope this makes sense 😉