Helpful Information
 
 
Category: MySQL Help
mod_auth_mysql - 'logging off' help needed

If you want to authenticate users using PHP and MySQL, then take a look at mod_auth_mysql: http://bourbon.netvision.net.il/mysql/mod_auth_mysql/

Only problem is, the page is above is about the only/best help page I can find on it.

My issue right now is: I want to give users (who have previously authenticated) the option to log themselves off a members area. I'm familiar with the

Header( "HTTP/1.0 401 Unauthorized");

approach, but I'd like to log them off more 'elegantly'. For example, I'd like to take them to a page which thanks them for logging off - and without the username/password box popping up again.

Any suggestions?

If you want to authenticate users using PHP and MySQL, then take a look at mod_auth_mysql: http://bourbon.netvision.net.il/mysql/mod_auth_mysql/

Only problem is, the page is above is about the only/best help page I can find on it.

My issue right now is: I want to give users (who have previously authenticated) the option to log themselves off a members area. I'm familiar with the

Header( "HTTP/1.0 401 Unauthorized");

approach, but I'd like to log them off more 'elegantly'. For example, I'd like to take them to a page which thanks them for logging off - and without the username/password box popping up again.

Any suggestions?

Hello got one, although it's not really a very secure one:

When logging out, you can create a client-side cookies (setcookie('status', 'logout')), and add a check on your login page to verify whether you have a cookie and what its state is. If you have no cookie you can use the PHP_AUTH_USER variables yo login, if you have a cookie and it's set to logout, you show the ral login screen so that another different user can be entered/selected.

I know, it's not that secure, but at least, it can offer nice logout/login windows in an https-nevironment.

Best,
UltraKnorrie










privacy (GDPR)