I have setup an authentication system using php3 and mySQL, authentication is done using $php_auth_user, firstly a check is done to see if the user has been validated if not the user is prompted for user and pass....
The information is compared using an sql query, and then the user is allowed/denied access.
currently the authentiction script is included in all the pages, what i would like to do is have 4 levels of access and use a simple if access_level = 001.... then the associated page with those access priviliges is loaded.
the problem im having is that after the fist page loaded, if the user loads the second page the authentication is checked and since the user is allready authenticated the query is not done, at this stage the viariable containing the users access privilges is blank and i would need to re-query the database just to get the info..
Any way around this?