The code is header("Refresh: 1; URL= index.php"); and it's put in this code:
elseif ($p == "logout") {
session_destroy();
echo "Logout effettuato con successo!";
header("Refresh: 1; URL= index.php");
ob_end_flush();
and here
if($verificadati == 1) {
$sessione = mysql_fetch_array($recuperadati);
$_SESSION['username'] = $sessione['username'];
echo "Login effettuato con successo!";
header("Refresh: 1; URL= index.php");
ob_end_flush();
the code header auto-refresh the page after a command