I am somewhat a novice with apache authentication so I'm not sure how to accomplish what I want. I have a protected directory that requires authentication (.htaccess). This brings up an automatic dialog for authenticating anytime a user tries to access something in that directory. However, that is not the behavior I want. I need to perform some prelimary functions with PHP prior to allowing the user access. Therefore I have a public PHP form in which the user provides a username/password. I can authenticate from that form using a MySQL query. Once authenticated and the preliminary work is done I want to load the first page in the protected directory. However, this requires a second log in for the user. What I want is to tell Apache that the user has already authenticated from my public PHP page so the second login is avoided. What function do I use to accomplish this? TIA.