Salve raga!
Chiedo scusa in anticipo per la stupidità della domanda!
Ho creato questo script per far loggare determinati utenti
, ma non riesco in alcun modo a creare il logout!
Qualcuno potrebbe aiutarmi??
Codice PHP:
<?php
session_start();
$members = array(
"utente1" => "password1",
"utente2" => "password2",
);
$username = isset($_POST['username']) ? trim($_POST['username']) : "";
$password = isset($_POST['password']) ? trim($_POST['password']) : "";
if($username == "" || $password == "")
die("Compila tutti i campi.");
if(isset($members[$username]) && $members[$username] == $password)
{
$_SESSION['auth'] = $username;
header("Location:blacksite.php");
}
else
{
die("Combinazione username/password errata.");
}
?>
Grazie in anticipo
!