Problem:On click logout it again shows the html page content which i dont want to show
<?php
session_start();
if(isset($_GET['action']) == 'logout'){
session_destroy();
unset($_SESSION['user']);
unset($_SESSION['pass']);
echo '<pre>';
print_r($_SESSION);
//header('location:index.php/');
exit();
}
if(isset($_SESSION['user'])== ' '){
header('location:index.php');
exit();
}
if( !( isset($_SERVER['PHP_AUTH_USER']) && $_SERVER['PHP_AUTH_USER'] == "a" && $_SERVER['PHP_AUTH_PW'] == "a" ) ){
header('WWW-Authenticate: Basic realm="My Realm"');
header('HTTP/1.0 401 Unauthorized');
echo 'You are not authenticated';
exit;
}else{
$_SESSION['user'] = $_SERVER['PHP_AUTH_USER'];
$_SESSION['pass'] = $_SERVER['PHP_AUTH_PW'];
?>
html code