PHP Classes

index protected

Recommend this page to a friend!

      PHP Login without Database  >  All threads  >  index protected  >  (Un) Subscribe thread alerts  
Subject:index protected
Summary:password protect the other pages
Messages:3
Author:Béla Varga
Date:2023-05-20 13:07:04
 

  1. index protected   Reply   Report abuse  
Picture of Béla Varga Béla Varga - 2023-05-20 13:07:04
Dear Sir! It's a wonderful script. Can you please add a pass protected index file which requires logging in and redirects to login page if you try to access without password? Thank you!

  2. Re: index protected   Reply   Report abuse  
Picture of Nguyen Hung Cuong Nguyen Hung Cuong - 2023-05-24 01:29:02 - In reply to message 1 from Béla Varga
Dear!
you just need to copy the first part of the index.php file and put it in any file that needs to be protected.

<?php

//@include 'config.php';

session_start();

if(!isset($_SESSION['admin_name'])){
header('location:login_form.php');
}

?>

  3. Re: index protected   Reply   Report abuse  
Picture of Béla Varga Béla Varga - 2023-05-30 13:48:15 - In reply to message 5 from Nguyen Hung Cuong
thank you Sir, you are the best awesome, let me send you some tips, crypto?