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:
    The login.php and register.php files manage login and registration. User credentials are verified and stored securely through loginControl.php and registerControl.php.

  • Session Management:
    The closeSession.php file handles secure user logout.

  • Product Management:
    Admins can add and manage products via the produPanel.php page, utilizing functionality from functions_panel.php.

  • Database Structure:
    The MySQL database stores user and product information, with optimized queries for selecting data. The connection is configured in db_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.
  • Admin Panel:
    Admins can manage users and products through separate panels (usrPanel.php and produPanel.php), allowing CRUD operations.

Database Operations

The application uses two main tables: users and products.

  • users: Contains id, username, and hashed_password. Admin privileges are determined by the id.
  • products: Stores product details, including id, name, category, description, price, and image (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 Login Screen image

  • Admin Panel Admin Panel image