Setup admin-login-only
Instructions
Follow these instructions to setup admin-login-only:
On your web server
- unpack/unzip the distribution package into a folder, for example: /admin-login-only (any valid folder name)
- open the file called: secret.php in a plain text or html editor
- enter your own value for ADMINPASSWORD, (optionally ADMINUSER and ADMINHOME), and save
Example: define("ADMINPASSWORD", "admin"); // change the RED text only
- Browse the file admin.php on your server
How to Protect any Page
After completing the setup above it is easy to protect any page. Simply add this one line of code to the top of any page:
<?php require_once("admin_only.php");?>
Test admin-login-only
Click here to test it out.
- Admin User: admin
- Password: admin
- default page you will load if successful: admin.php
Click here to test it out.
|