Skip to content

A robust marketplace platform using PHP and MySQL. Users can create accounts, list products, and handle transactions. Key features include user registration, product listings, search and filtering, a shopping cart, and order management. Ideal for building a complete e-commerce solution.

Notifications You must be signed in to change notification settings

Iqbolshoh/php-mysql-marketplace

Repository files navigation

PHP-MySQL Marketplace

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.

Marketplace Banner

Features

  • 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.

Login Page

Roles

User Roles

Admin

Admin

  • 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.

Seller

Seller

  • 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.

User

User

  • 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.

Technologies Used

HTML CSS Bootstrap JavaScript jQuery PHP MySQL

Installation

To get started with the PHP-MySQL Marketplace, follow these steps:

  1. Clone the Repository:

    git clone https://github.com/Iqbolshoh/php-mysql-marketplace.git
  2. Navigate to the Project Directory:

    cd php-mysql-marketplace
  3. Set Up the Database:

    • Create a new MySQL database:

      CREATE DATABASE marketplace_db;
    • Import the database.sql file located in the db directory to set up the initial database structure:

      mysql -u yourusername -p marketplace_db < db/database.sql
  4. 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 the config.php file and call the getConnection method to connect to the database.
  5. 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.

Contributing

Contributions are welcome! If you have suggestions or want to enhance the project, feel free to fork the repository and submit a pull request.

Connect with Me

I love connecting with new people and exploring new opportunities. Feel free to reach out to me through any of the platforms below:

GitHub Telegram LinkedIn instagram WhatsApp Twitter Email

About

A robust marketplace platform using PHP and MySQL. Users can create accounts, list products, and handle transactions. Key features include user registration, product listings, search and filtering, a shopping cart, and order management. Ideal for building a complete e-commerce solution.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published