A PHP project on How to working a login registration authentication system with SQL and SQLite3 database using PDO.
- PHP 8.3+ or later
- CSS/Lesscss
- JavaScript
- SQL/SQLite3
- composer v2.10
CSRFprotection token- Session and Cookie
- Password hashing with
bcryptusingpassword_hash()&password_verify()not bymd5()orsha1(). - OTP Verification
- Caching for fast
viewrendering - Logs files (store errors files)
git clone https://github.com/codebysushil/login-registration.git
cd login-registration
composer setupcomposer serveCreate Users table.
CREATETABLEIF NOT EXISTS users (
id INTEGERPRIMARY KEY AUTOINCREMENT,
name TEXTNOT NULL,
email TEXTNOT NULL UNIQUE COLLATE NOCASE,
password_hash TEXTNOT NULL,
is_active INTEGERNOT NULL DEFAULT 1,
email_verified INTEGERNOT NULL DEFAULT 0,
last_login_at TEXT,
created_at TEXTNOT NULL DEFAULT CURRENT_TIMESTAMP,
updated_at TEXTNOT NULL DEFAULT CURRENT_TIMESTAMP,
CHECK (is_active IN (0, 1)),
CHECK (email_verified IN (0, 1)),
CHECK (length(name) BETWEEN 1AND100)
);