Simple testing php login framework for server testing and authentication.
- The system is coded 100% in PHP (although a minimal knowledge of HTML is required).
- The visual framework used is Bootstrap.
- There are four main pages:
login.php
shows the login form,index.php
the default password-protected area,logout.php
simply ends the session andconfig.php
stores the user's information.
- Download the source files to your computer.
- Open
config.php
with your text editor and find the variables$Username
and$Password
. - Change the username and password ( use the salted version of your password).
- Save the files, upload them to your webserver .
- If you want to password-protect any page, just add this snippet of code at the beginning of it:
<?php
session_start(); /* Starts the session */
if($_SESSION['Active'] == false){ /* Redirects user to login.php if not logged in */
header("location:login.php");
exit;
}
?>