htaccess logout – simple and works

< ?php

$loginname = $_SERVER[’PHP_AUTH_USER’];
$password = $_SERVER[’PHP_AUTH_PW’];
if(!$user_info[’user_id’])
{
unset($user_info);
unset($loginname);
unset($password);
header(’HTTP/1.1 401 Unauthorized’);
header(’WWW-Authenticate: Basic realm=”Restricted Area”‘);
echo “Access Denied.”;
exit;
}
? >

This entry was posted in Web Programming. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>