Wednesday, November 20, 2013

Fully Secured php script for Log-in with advance session without database

Now you can use this script on your website or on any log-in webpage, which you want to secure online. This php script Provides best security along with multiusers & passwords. You can also use this php script without using MySql database.


Feature: This script has no errors and no security hole,
For example: By using this script you can’t access secured page by pressing the back button, after logging out, which you were able to access earlier.

Code Below for Login.php file

Code Below for to be secure any page file
<?php session_start();
//check logged in or not!
if(!isset($_SESSION['login_user'])){
header('Location:dstar_infotech_login.php?pagename='.basename($_SERVER['PHP_SELF'], ".php")); }
?>

Code Below for Logout session
login.php?ch=logout
This link for for destroyed already made session
you can modified this link as per your choice according to login page name

2 comments :

  1. html code fine..ok but how to link this code my website please guide me

    ReplyDelete