Made by Lynith, I suck at PHP
An all purpose e-commerce store written in PHP utilising MySQL. It consists of user management, a basic permission system and management of product listings.
- User login + register + logout
- User permissions
- Adding / removing of products
- Searching for products by name and description
- Setting the featured product
- Adding products to the cart for the current session
- "Buying" products
The file structure is split as follows:
assets- folder containing website graphicscategories- folder containing pages for the categories sub-routecomponents- folder containing reusable components across the entire websitehelpers- folder containing utilities and wrappersproducts- folder containing pages for the products sub-routesqlinit.sql- file containing SQL queries to create an empty database with tablespopulate.sql- file containing a sample dumped SQL database
styles- folder containing CSSuser_content- folder containing uploaded user content, such as product images
All queries are created with prepared SQL statements, which should disallow the most common and simplest attack on PHP-written websites, SQL Injection
The project attempts to split all logic from the routes, which should allow for a cleaner and easier to maintain codebase - of course the logic still needs to be called from the routes.