This is a marketplace platform built using PHP and MySQL. It provides a user-friendly interface where users can buy and sell various products. The project showcases the use of PHP for server-side scripting and MySQL for database management.
- User Registration and Login: Users can create accounts, log in, and manage their profiles.
- Product Listings: Users can list products for sale with details such as price, description, and images.
- Search and Filters: Users can search for products and filter them based on various criteria.
- Shopping Cart: Users can add products to their shopping cart and proceed to checkout.
- Order Management: Admins can manage orders, view order details, and update order statuses.
- Manages the entire marketplace.
- Can view and manage all users and their products.
- Can update or delete any listings.
- Oversees order management and resolves any issues.
- Can also block users.
- Can list products for sale and manage their own product listings.
- Can view and update their orders and order statuses.
- Manages their own profile and product details.
- Can browse products, add them to the shopping cart, and make purchases.
- Can create and manage their own profile.
- Can view their own order history and track orders.
To get started with the PHP-MySQL Marketplace, follow these steps:
-
Clone the Repository:
git clone https://github.com/Iqbolshoh/php-mysql-marketplace.git
-
Navigate to the Project Directory:
cd php-mysql-marketplace
-
Set Up the Database:
-
Create a new MySQL database:
CREATE DATABASE marketplace_db;
-
Import the
database.sql
file located in thedb
directory to set up the initial database structure:mysql -u yourusername -p marketplace_db < db/database.sql
-
-
Configure Database Connection:
- Open the
config.php
file in the root directory. - Update the database credentials to match your MySQL setup:
<?php public function __construct() { $servername = "localhost"; $username = "your_username"; $password = "password"; $dbname = "marketplace_db"; $this->conn = new mysqli($servername, $username, $password, $dbname); if ($this->conn->connect_error) { die("Connection failed: " . $this->conn->connect_error); } }
- Note: You should add the
class Database
in theconfig.php
file and call thegetConnection
method to connect to the database.
- Open the
-
Run the Application:
- Deploy the application on a PHP-compatible server (e.g., Apache or Nginx).
- Access the marketplace through your web browser at
http://localhost/php-mysql-marketplace
.
Contributions are welcome! If you have suggestions or want to enhance the project, feel free to fork the repository and submit a pull request.
I love connecting with new people and exploring new opportunities. Feel free to reach out to me through any of the platforms below: