Simple PHP with MySQL account authentication to protect pages, includes an automatic creation via a form (index.html
), file cleanup and multiple methods of login protection.
-
Password hashing.
-
Self generating captcha (optional).
-
5 wrong login attempts sees 10 minute cool down.
-
Styled with Bootstrap 4.1.3
-
Removes unwanted files depending on captcha on/off
Anyone that needs an easy to install/setup login system to protect web pages such as dashboards, information pages, hubs or control panels from prying eyes.
-
Unzip this project into your directory or sub directory of choice
-
Have a MySQL account with database/table create ability
-
Navigate to where you placed these files
-
index.html
should load, fill in the form and submit -
If done right you will be at the default login page now
-
Use the username and password entered in the form to login
To protect pages simply put at the start of the page:
session_start();
if (!isset($_SESSION['user'])) {
//User not logged in
//do a redirect to login page (index.php)
} else {
//show page stuff
}