Hello,
I have searched the web and found a 1000 exaples, tutors, script & tips covering the subject of user authinication / login in php using a wide varity of methods such as sessions, cookies, mysql, flatfiles, etc, etc, etc.
Surprisingly I am yet to find one page/site that provides comlpeat explanation/solution that does the following using PHP, .htpasswd
and header( 'HTTP/1.0 401 Unauthorized' ); method.
NOTE Both login and LOGOUT required
Is there any one out there who has seen anything like this 8-)
A. LOGIN
1a. check if user has just come in.
1b. check if user has logedout and come back again
2. prompt for username and password
3. check if user is valid/ok
4a. if ok redirect user to next page
4b. or redirect user back to login page
B. LOGOUT
1. logout and confirm to user that he has been logged out
Ciao,