ho provato così però non mi funziona:
dove sbaglio?<?
if (isset($_GET['action']) && $_GET['action']=='logout') {
logout();
}
function logout() {
unset($_SESSION['logout']);
session_destroy();
header("Location: index.php");
}
?>
ho provato così però non mi funziona:
dove sbaglio?<?
if (isset($_GET['action']) && $_GET['action']=='logout') {
logout();
}
function logout() {
unset($_SESSION['logout']);
session_destroy();
header("Location: index.php");
}
?>