A simple authentication system built with PHP using a manual MVC structure. Features include:
- User registration and login with password hashing
- Role-based access control (Admin/User/Editor)
- Real-time front-end form validation
- Secure session-based authentication
XAMPP (PHP 7.4+ and MySQL)
-
Clone or download this repo
Place the project in your XAMPP
htdocsfolder:
C:\xampp\htdocs\php-auth-mvc -
Start Apache and MySQL via XAMPP Control Panel
-
Create a database
- Open
http://localhost/phpmyadmin - Create a new database (e.g.,
auth_system) - Import the provided
.sqlfile
- Open
-
Configure the project
- Open
/app/config/config.php - Set your database credentials (DB name, user, password)
- Open
-
Visit the app
- Open browser and go to:
http://localhost/php-authentication-mvc/public
- Open browser and go to: