Category Archives: Web Programming

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; } ? >

Posted in Web Programming | Leave a comment