I want to redirect a page automatically in PHP
Logout.php:
<?php
include "base.php";
$_SESSION = array(); session_destroy();
?>
<meta http-equiv="refresh" content="=0;URL=index.php" />
Where base.php calls the database and starts the session:
<?php
session_start();
$dbhost = "localhost";
$dbname = "login";
$dbuser = "root";
$dbpass = "";
mysql_connect($dbhost, $dbuser, $dbpass) or die("MySQL Error: " . mysql_error());
mysql_select_db($dbname) or die("MySQL Error: " . mysql_error());
?>
When pressing logout, I am not getting back to index.php
.