Secure Login & Authentication System
A ready-to-use login system in plain PHP and MySQL. Drop it into a new project and get registration, login, logout, 'remember me' and password reset working in minutes. Passwords are hashed with password_hash(), every form is CSRF-protected, queries use PDO prepared statements and sessions are regenerated on login. The code is a small, readable MVC structure with no framework, so it is easy to extend. Reset emails use PHP mail() or write to a log file while you develop.
- Register, login, logout and remember-me
- Forgot password with expiring, single-use reset links
- password_hash() hashing and PDO prepared statements