PHP Web Management System for Product and User Administration
Project for the Web Application Implementation subject of my Higher Vocational Training in Network Computer Systems Administration
Introduction
For my final project in Higher Vocational Training in Network Computer Systems Administration, I developed a PHP-based web application for managing users and products. The system allows administrators to handle user registration, login, and product management through a straightforward interface.
I used PHP, HTML, CSS, and basic JavaScript, providing practical experience in web development.
Project Structure
The project is organized into a clear directory structure for easier management and future expansion:
/
└── project
├── welcome.html
├── index.php
├── login.php
├── register.php
├── control_config
│ ├── closeSession.php
│ ├── db_config.php
│ ├── db_config_onlyselect.php
│ ├── loginControl.php
│ └── registerControl.php
├── panel
│ ├── functions_panel.php
│ ├── produPanel.php
│ └── usrPanel.php
└── images
├── loginAssets
│ ├── loginAsset.gif
│ └── loginAsset2.png
└── productsAssets
├── Seeds
│ └── image.webp
└── Flowers
└── image.webp
Key Features
-
User Authentication:
Thelogin.php
andregister.php
files manage login and registration. User credentials are verified and stored securely throughloginControl.php
andregisterControl.php
. -
Session Management:
ThecloseSession.php
file handles secure user logout. -
Product Management:
Admins can add and manage products via theproduPanel.php
page, utilizing functionality fromfunctions_panel.php
. -
Database Structure:
The MySQL database stores user and product information, with optimized queries for selecting data. The connection is configured indb_config.php
, and queries are executed through the admin panel and control files.- The
db_config_onlyselect.php
file is specifically used for preventing unauthorized access to the admin panel. It handles SELECT queries that are used to verify user credentials and manage user access, ensuring that users can only access areas that they are authorized for. This file prevents non-admin users from making changes or accessing sensitive areas of the system by allowing only read operations.
- The
-
Admin Panel:
Admins can manage users and products through separate panels (usrPanel.php
andproduPanel.php
), allowing CRUD operations.
Database Operations
The application uses two main tables: users and products.
- users: Contains
id
,username
, andhashed_password
. Admin privileges are determined by theid
. - products: Stores product details, including
id
,name
,category
,description
,price
, andimage
(image URL).
When a user registers, their data is inserted into the users table. Admins, identified by id
, can add products to the products table. Product images are stored in the productAssets
directory.
Conclusion
This project allowed me to apply my skills in PHP, HTML, CSS, and basic JavaScript to build a functional web application. I enhanced my understanding of session management, database handling, and SQL optimization. The hands-on experience in creating a simple admin panel and managing product and user data will be valuable for future projects and web development work.
Key Screenshots
-
Login Screen
-
Admin Panel