I have a directory password protected with a .htaccess file (needs to stay that way so anything in the directory is protected even non PHP files)
I have a index.php file in that directory. I need that PHP file to know what the username and password that the user entered is (the username/ password was handled by the .htaccess file)
I can modify both the PHP file and the .htaccess file to accomplish this task. Does anyone know how to let the PHP file know what the .htaccess file recieved as a username and password? Tried PHP_AUTH_USER and AUTH_USER and that didn't work (or so I think).
Can anyone give me a simple solution with an example if possible? Thanks a ton, I am new to PHP.