Project Report: User Authentication System using PHP & MySQL
1. Project Title:
User Authentication System
2. Introduction:
This project is a User Authentication System developed using PHP and MySQL. It
demonstrates core functionalities of a web application, including user registration,
login, and profile management. The system ensures secure access and personalized
data handling for each registered user.
3. Objectives:
- To create a secure user login and registration system.
- To allow users to upload and view their profile photo.
- To manage user sessions and display user details upon successful login.
4. Technologies Used:
PHP - Server-side scripting
MySQL - Relational Database Management
HTML/CSS - Web Page Structure and Styling
Bootstrap - Responsive UI Design Framework
5. Functional Modules:
A. Registration ([Link]):
- Accepts user input: name, email, username, password, confirm password, and
photo.
- Validates form input.
- Stores data in the MySQL database if all validations pass.
- Saves uploaded image in the server folder.
- Displays success/failure alerts.
B. Login ([Link]):
- Takes email/username and password as input.
- Checks credentials against the database.
- If matched, initiates session and redirects to [Link].
- Otherwise, displays error alert.
C. Profile ([Link]):
- Retrieves user information using session id.
- Displays full user profile: name, email, username, and profile photo.
- Includes session validation to restrict access.
6. Database Design:
Table Name: user
Column Name | Data Type | Description
------------|---------------|--------------------------
id | INT (Primary) | Auto-increment User ID
name | VARCHAR | Full name of the user
email | VARCHAR | Email address
username | VARCHAR | Chosen username
password | VARCHAR | Password (hashed)
photo | VARCHAR | Path to profile image
7. Folder Structure:
/project-folder
├── [Link]
├── [Link]
├── [Link]
├── [Link]
└── uploads/ (Profile images)
8. Security Features:
- Password confirmation during registration.
- Session-based access control for user profile.
- Alerts for login failures and mismatched passwords.
- (Recommended) Use of password_hash() and password_verify() for better
security.
9. Output Screens:
- Registration Page: Inputs user data and uploads photo.
- Login Page: Authenticates the user.
- Profile Page: Displays user details and image.
10. Future Enhancements:
- Add password recovery via email.
- Implement profile editing and image updating.
- Add admin panel to manage users.
- Apply stronger hashing and form sanitization.
11. Conclusion:
This project is a basic but functional user authentication system using PHP and
MySQL. It demonstrates how to handle form input, store and retrieve data from the
database, use sessions for login management, and display personalized content
based on logged-in users.
It serves as a foundational system for larger web applications requiring user login
functionality.