A simple and secure user registration system written in PHP using PDO.
- Secure password hashing
- PDO prepared statements
- Duplicate username checking
- Error handling and logging
- Organized repository structure
-
Clone the repository
-
Create your database and update
config/config.phpwith your credentials. -
Run the following SQL to create the
userstable:CREATE TABLE users ( id INT AUTO_INCREMENT PRIMARY KEY, username VARCHAR(255) UNIQUE NOT NULL, password VARCHAR(255) NOT NULL );
-
Point your web server to the
public/directory.
- Always use HTTPS in production.
- Change default credentials.
- Consider implementing CSRF protection.