GEM-I'm a dedicated Wordpress & Squarespace developer

Free download connection,Session,logout php files

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");
?>
Spread the Code

GEM

GEM

You may also like...