A simple authentication system with register/login flow and a basic dashboard built with PHP, MySQL, and sessions.
- User registration and login with password hashing
- Session management with timeout
- PDO for secure database queries
# 1. Create database
CREATE TABLE users (
id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(100) NOT NULL,
email VARCHAR(190) NOT NULL UNIQUE,
password_hash VARCHAR(255) NOT NULL,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
# 2. Add .env file
DB_HOST=127.0.0.1
DB_NAME=dashboard_demo
DB_USER=demo_user
DB_PASS=demo_pass
# 3. Run locally
php -S localhost:8000
## Note
Do not commit real credentials. This project is for demonstration purposes only.