Re: PHP and .HTACCESS
| From: | Marek Kilimajer | Date: | Fri, 03 Oct 2003 16:16:33 +0000 |
| Subject: | Re: PHP and .HTACCESS | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-164932@lists.php.net to get a copy of this message | ||
it is virtualy impossible to make the browser forget the credentials.
How this is solved is that the logoff link is
login.php?logoff=username
In login.php you check for $_GET['logoff'] variable, if it is set you will not let the user with the same name ($_GET['logoff']) log in.
James D. Stallings wrote:
I am new to learning PHP and have learned a lot over the last few weeks. One thing that I can not find anywhere is how to code it so a user can click logoff and have it route them to another page and remove their authentication that was set. ie... I user goes to www.mysite.com and clicks on a link called STAFF The STAFF.mysite.com is protected with authentication using .htaccess The staff enters their ID and Password and is allowed in. I want to have a button that says LOGOFFF that will remove the authentication I know how to do the header(location... to route them back to another page, but I have not been able to remove the authentication so it will ask them for their password again when they return to staff.mysite.com I have even tried: header('WWW-Authenticate: Negotiate'); header('WWW-Authenticate: NTLM', FALSE); but no go... Thanks in advance!! Jim