Free download connection,Session,logout php files

Last updated on June 23rd, 2021 at 11:44 am

Reading Time: < 1 minute

connection.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");
?>
Share Post

GEM

Author

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *