Last updated on June 23rd, 2021 at 11:44 am
Reading Time: < 1 minuteconnection.php file
<?php
mysql_connect("localhost","root","");
mysql_select_db("databasename");
?>
session.php file
<?php
session_start();
if(empty($_SESSION['id']))
{
header("location:login.php");
}
?>
logout.php file
<?php
session_start();
session_destroy();
$_SESSION['id']="";
unset($_SESSION['id']);
header("location:login.php");
?>