The E-Commerce Shop Project in PHP and MySQL is a complete shopping cart system for beginners who want to learn how an online store works.
It includes product listing, cart management, checkout, and a simple admin dashboard to add or edit products.
This project is built using core PHP (no framework) and MySQL, making it lightweight and easy to run locally using XAMPP.
Key Features
- User-friendly product listing and category pages
- Add to Cart, update quantity, and remove items
- Automatic VAT and total calculation
- Checkout modal with order confirmation
- Simple admin login and product management
- Clean and responsive UI (HTML, CSS, JavaScript)
- Ready-to-import MySQL database with demo data
Project Information
| Details | Description |
|---|---|
| Project Title | E-Commerce Shop in PHP and MySQL |
| Technology Used | PHP, MySQL, HTML, CSS, JavaScript |
| Database | ecommerce |
| Server Requirement | XAMPP / PHP 5.6+ |
| Difficulty Level | Beginner |
| Files Included | PHP Files, SQL File, CSS, JS, Images |
Folder Structure
c:\xampp\htdocs\shop\
│
├── db.php
├── database/
│ └── ecommerce.sql
├── cart/
│ └── data.php
├── include/home/
│ ├── header.php
│ ├── footer.php
│ └── modal.php
├── css/
├── js/
└── reservation/img/products/How to Run the Project (Step-by-Step)
Prerequisites
- Install XAMPP (includes Apache, PHP, and MySQL)
- Ensure PHP 5.6+ and MySQL 5.6+ are available
Setup Files
- Copy the folder to →
C:\xampp\htdocs\shop - Or unzip your downloaded project to the same location
Setup Database
- Start Apache and MySQL from the XAMPP Control Panel
- Open browser → http://localhost/phpmyadmin
- Create a new database named ecommerce
- Import file →
C:\xampp\htdocs\shop\database\ecommerce.sql - Check db.php for database credentials:
$mysql_hostname = "localhost";
$mysql_user = "root";
$mysql_password = "";
$mysql_database = "dbgadget"; Run the Project
- Open browser and visit → http://localhost/shop/
Default Admin Login (Optional)
| User | Password |
|---|---|
| admin | admin |
- Then visit → http://localhost/shop/admin.php
Common Issues & Quick Fix
- Issue:
TypeError: $(…).slider is not a function - Fix: Either include a jQuery slider plugin (e.g., bootstrap-slider.min.js) or wrap the script as:
if ($.fn.slider) { $('#sl2').slider(); }
Demo Workflow
- Open homepage → see products
- Click any product → product details page
- Click “Add to Cart” → see quantity increase in cart
- Open cart page → check total and VAT
- Click “Checkout” → confirm order
Why Use This Project
This project is perfect for:
- Students learning core PHP and MySQL
- Beginners exploring e-commerce logic
- Developers creating mini online store prototypes
Download Project
Screenshots









These are really impressive ideas in concerning blogging.
You have touched some fastidious points here. Any way keep up wrinting.