A Role-Based Access Control (RBAC) system with login functionality.
- User authentication (login/logout)
- User registration
- Role-based access control
- Dashboard with permission-based feature access
- Secure password hashing
-
Database Setup
- Import the
database.sqlfile into your MySQL database using phpMyAdmin or MySQL command line - The SQL file will create the necessary database, tables, and default data
- Import the
-
Configuration
- The database connection is configured in
includes/config.php - Default settings use:
- Host: localhost
- Database: rbac_db
- Username: root
- Password: (empty)
- Update these settings if your environment differs
- The database connection is configured in
-
Default Admin Account
- Username: admin
- Password: admin123
- This account has full system access
/- Root directory with main pages/css- Stylesheets/includes- Configuration and helper functions
index.php- Login pageregister.php- User registrationdashboard.php- Main dashboard after loginlogout.php- Handles user logout
- Password hashing using PHP's password_hash() function
- Input sanitization
- Session-based authentication
- PDO for database interactions with prepared statements
- PHP 7.0 or higher
- MySQL 5.6 or higher
- Web server (Apache/Nginx)