This authentication system provides user registration, login, and session management functionalities. It ensures secure authentication using PHP and MySQL.
- User Registration
- User Login
- User Logout
- Password Hashing for Security
- Session Management
- PHP
- MySQL
- HTML & CSS
- A web server (e.g., Apache with PHP support)
- MySQL database
- PHP 7 or later
- Clone the repository or download the files.
git clone https://github.com/yourusername/authentication-system.git
- Import the
database.sql
file into your MySQL database. - Update the
db.php
file with your database credentials. - Place the project files in your web server's root directory (e.g.,
htdocs
for XAMPP). - Start the Apache and MySQL services.
- Open your browser and navigate to
http://localhost/authentication-system/
.
/authentication-system/
│-- index.html # Home Page
│-- register.html # Registration Page
│-- register.php # Registration Script
│-- login.php # Login Script
│-- logout.php # Logout Script
│-- dashboard.php # Protected Dashboard Page
│-- db.php # Database Configuration
│-- LICENSE # License Information
- Navigate to
register.html
. - Enter the required details and submit the form.
- Your account will be created and stored in the database.
- Navigate to
login.php
. - Enter your registered email and password.
- Upon successful login, you will be redirected to
dashboard.php
.
- Click the logout button to end the session and return to the login page.
- Passwords are securely hashed using
password_hash()
. - User sessions are managed using
session_start()
and properly destroyed on logout.
This project is open-source and free to use under the MIT License.
For any issues or feature requests, please open an issue on GitHub