I'm wondering, is there a way to auth .htaccess using PHP? Basically, I have a username and password field on an .shtml page. This data is then sent to a .php page that checks to see if the username and password match from a mysql database. this is where i stopped.
I want the .php page to redirect the user to a "members only" dir where there will be pages and files only members are allowed to access. I'm guessing that to look this dir, I need to use .htaccess in the dir. But, if the .php page redirects the user to the dir... then won't .htaccess prompt the user for a username and password?, even after they have passed the auth in the beginning>? (shtml and php page).
I still want .htaccess to deter intruders if someone tries to access the dir by typing it into a browser, but I want to allow access to users who auth the first time, without having to auth again. is this possible??
I'm kinda a php newbie here and I'm just starting to play around with headers. Please help me. Thank you in advance.