This is a secure PHP login system that utilizes password hashing for enhanced security. The system connects to a MySQL database to handle user registration and login.
- User registration with password hashing
- Secure login with password verification
- Session management for user authentication
- MySQL database integration
Clone the repository:
git clone https://github.com/your-username/secure-php-login-system.git
- Import the database structure by executing the database.sql file on your MySQL server. This will create the necessary users table.
- Configure the database connection in the PHP files:
Open register.php, login.php, and index.php files and update the following line with your MySQL database credentials:
$conn = mysqli_connect("localhost", "root", "", "authentication");
Replace "localhost" with your database host, "root" with your database username, "" with your database password, and "authentication" with your database name. - Upload the PHP files to your web server.
- Access the application through your web server's URL.
- Visit the registration page.
- Fill out the registration form with your name, email, and password.
- Click on the "Register" button.
- If the registration is successful, you will be redirected to the login page.
- Visit the login page.
- Enter your registered email and password.
- Click on the "Login" button.
- If the login is successful, you will be redirected to the authenticated page.
Contributions are welcome! If you find any issues or have suggestions for improvements, please create an issue or submit a pull request.
This project is licensed under the MIT License.