A responsive PHP and MySQL comic book shop built for XAMPP. Customers can browse comics, view product details, manage a cart, place orders, track order status, subscribe to the newsletter, and download PDF invoices. Admin users can manage products and orders from protected admin pages.
- Responsive homepage, shop, product, cart, checkout, order, admin, about, contact, and FAQ pages
- Product catalog with Marvel, DC, and other comic categories
- Product detail pages with publisher, writer, format, age rating, and long descriptions
- Sorting by name, price, newest, oldest, and category
- Session cart with item count in the navbar and quantity limits
- User signup, login, logout, and protected customer order pages
- Checkout with saved delivery details and order totals
- Order tracking with status, item details, and invoice download
- PDF invoice generation with FPDF
- Newsletter subscription for logged-in user emails
- Protected admin panel for product and order management
- Admin order status updates for processing, shipped, delivered, and cancelled orders
- PHP
- MySQL / MariaDB
- PDO
- FPDF
- HTML
- CSS
- JavaScript
- XAMPP
api/- JSON endpoints for login and signupassets/css/- existing stylesheets for layout, navbar, admin, cart, contact, product, slider, and skew sectionsassets/js/- browser scriptsconfig/- database connectiondatabase/- SQL export for project setupfpdf/- local FPDF runtime files for server-side invoice generationimages/- static images, icons, banners, and product imagesincludes/- shared PHP classes, helpers, header, footer, and session startpdf/- generated invoices, ignored by Git except.gitkeep
The database name is:
comic_book_store
The SQL export is included here:
database/comic_book_store.sql
It contains the current schema and sample data for:
categoriesnewsletter_subscribersorderitemsordersproductsusers
- Copy this project into your XAMPP
htdocsfolder. - Start Apache and MySQL from XAMPP.
- Open phpMyAdmin or the MySQL CLI.
- Import
database/comic_book_store.sql. - Open the site:
http://localhost/The-Comic-Shop/
Database settings are in:
config/database.php
Default local settings:
host: localhost
user: root
password:
database: comic_book_store
index.php- homepageshop.php- full comic catalogviewProduct.php- product detailscart.php- shopping cartcheckout.php- checkout formorders.php- customer order trackingorderDetails.php- order detailspdfCheckout.php- invoice generation and downloadadmin.php- admin product paneladminOrders.php- admin order paneladminOrderDetails.php- admin order detailsabout.php- about pagecontact.php- contact pagefaqs.php- FAQs page
- Generated invoice PDFs are written to
pdf/and are ignored by Git. - Product images are stored under
images/products/. - FPDF stays local because invoice PDFs are generated by PHP on the server.
- Admin access is controlled through the logged-in user's role.
MIT