This repository contains a secure user authentication system built with PHP and MySQL. It includes essential features such as user registration, login, logout, and session management.
β
User Registration β Create an account with secure password hashing.
β
User Login β Authenticate users with session management.
β
User Logout β Secure logout with session destruction.
β
Session Management β Keep users logged in securely.
β
Hashed Passwords β Uses password_hash()
for better security.
β
Error Handling β Displays friendly error messages.
- Navigate to Signup Page (
signup/
). - Fill out the registration form.
- Submit the form.
- Upon successful registration, you will be redirected to the login page.
- Go to the Login Page (
login/
). - Enter your credentials.
- Click Login to access the dashboard.
- π₯ Admin Login:
iqbolshoh
- π€ User Login:
user
- π Password:
IQBOLSHOH
- Click the Logout button.
- Your session will be destroyed, and you'll be redirected to the login page.
Follow these steps to set up the project locally:
-
Clone the repository:
git clone https://github.com/iqbolshoh/php-auth-system.git
-
Navigate to the project directory:
cd php-auth-system
-
Import the database:
- Open phpMyAdmin or any MySQL management tool.
- Create a new database (
auth_system
). - Import the
database.sql
file.
-
Update database credentials in
config.php
:$servername = "localhost"; $username = "root"; $password = ""; $dbname = "auth_system";
π― Contributions are welcome! If you have suggestions or want to enhance the project, feel free to fork the repository and submit a pull request.
π¬ I love meeting new people and discussing tech, business, and creative ideas. Letβs connect! You can reach me on these platforms: