<?php 

session_start();
// store to test if they *were* logged in 

if(isset($_COOKIE['cookadminname']) && isset($_COOKIE['cookadminpass'])){
   setcookie("cookadminname", "", time()-3600, "/");
   setcookie("cookadminpass", "", time()-3600, "/");
}

$old_user = $_SESSION['valid_admin']; 
unset($_SESSION['valid_admin']); 
session_destroy();

header ("Location: login.php");

?> 
