php-mysql-marketplace
# π PHP MySQL Marketplace This is an **online marketplace platform** built using **PHP and MySQL**, where users can **buy and sell products** with ease. The project demonstrates the use of **PHP for server-side scripting** and **MySQL for database management**.  --- ## π― **Features** β **π User Registration & Login** β Users can create accounts, log in, and manage their profiles β **π Product Listings** β Sellers can list products with price, description, and images β **π Search & Filters** β Users can search for products and filter them based on various criteria β **π Shopping Cart** β Users can add products to their cart and proceed to checkout β **π¦ Order Management** β Admins can manage orders and update order statuses --- ## π **Login Page**  - **π₯ Admin Login:** `iqbolshoh` - **π€ Seller Login:** `user` - **π€ User Login:** `user` - **π Password:** `IQBOLSHOH` --- ## π₯ **User Roles** ### π **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 issues - πΉ Can **block** users if needed ### π **Seller**  - πΉ Can **list** products for sale and manage their listings - πΉ Can view and update their **orders** - πΉ Manages their **profile and product details** ### π€ **User (Customer)**  - πΉ Can **browse products**, add them to the cart, and **purchase** - πΉ Can create and manage their **profile** - πΉ Can view **order history** and track orders --- ## β‘ **Installation Guide** To set up the **PHP-MySQL Marketplace**, follow these steps: ### 1οΈβ£ **Clone the Repository** ```bash git clone https://github.com/Iqbolshoh/php-mysql-marketplace.git ``` ### 2οΈβ£ **Navigate to the Project Directory** ```bash cd php-mysql-marketplace ``` ### 3οΈβ£ **Set Up the Database** - **Create a new MySQL database**: ```sql CREATE DATABASE marketplace; ``` - **Import the database schema**: ```bash mysql -u yourusername -p marketplace < db/database.sql ``` ### 4οΈβ£ **Configure Database Connection** - Open the **`config.php`** file in the root directory - Update the database credentials: ```php <?php public function __construct() { $servername = "localhost"; $username = "your_username"; $password = "password"; $dbname = "marketplace"; $this->conn = new mysqli($servername, $username, $password, $dbname); if ($this->conn->connect_error) { die("Connection failed: " . $this->conn->connect_error); } } ``` - **Ensure you have a `Database` class** in the `config.php` file ### 5οΈβ£ **Run the Application** - Deploy on a **PHP-compatible server** (Apache, Nginx, or XAMPP) - Open your browser and access: ``` http://localhost/php-mysql-marketplace ``` --- ## π₯ Technologies Used        ## π License This project is open-source and available under the **MIT License**. ## π€ 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 meeting new people and discussing tech, business, and creative ideas. Letβs connect! You can reach me on these platforms: <div align="center"> <table> <tr> <td> <a href="https://iqbolshoh.uz" target="_blank"> <img src="https://img.icons8.com/color/48/domain.png" height="40" width="40" alt="Website" title="Website" /> </a> </td> <td> <a href="mailto:[email protected]" target="_blank"> <img src="https://github.com/gayanvoice/github-active-users-monitor/blob/master/public/images/icons/gmail.svg" height="40" width="40" alt="Email" title="Email" /> </a> </td> <td> <a href="https://github.com/iqbolshoh" target="_blank"> <img src="https://raw.githubusercontent.com/rahuldkjain/github-profile-readme-generator/master/src/images/icons/Social/github.svg" height="40" width="40" alt="GitHub" title="GitHub" /> </a> </td> <td> <a href="https://www.linkedin.com/in/iqbolshoh/" target="_blank"> <img src="https://github.com/gayanvoice/github-active-users-monitor/blob/master/public/images/icons/linkedin.svg" height="40" width="40" alt="LinkedIn" title="LinkedIn" /> </a> </td> <td> <a href="https://t.me/iqbolshoh_777" target="_blank"> <img src="https://github.com/gayanvoice/github-active-users-monitor/blob/master/public/images/icons/telegram.svg" height="40" width="40" alt="Telegram" title="Telegram" /> </a> </td> <td> <a href="https://wa.me/998997799333" target="_blank"> <img src="https://github.com/gayanvoice/github-active-users-monitor/blob/master/public/images/icons/whatsapp.svg" height="40" width="40" alt="WhatsApp" title="WhatsApp" /> </a> </td> <td> <a href="https://instagram.com/iqbolshoh_777" target="_blank"> <img src="https://raw.githubusercontent.com/rahuldkjain/github-profile-readme-generator/master/src/images/icons/Social/instagram.svg" height="40" width="40" alt="Instagram" title="Instagram" /> </a> </td> <td> <a href="https://x.com/iqbolshoh_777" target="_blank"> <img src="https://img.shields.io/badge/X-000000?style=for-the-badge&logo=x&logoColor=white" height="40" width="40" alt="X" title="X (Twitter)" /> </a> </td> <td> <a href="https://www.youtube.com/@Iqbolshoh_777" target="_blank"> <img src="https://raw.githubusercontent.com/rahuldkjain/github-profile-readme-generator/master/src/images/icons/Social/youtube.svg" height="40" width="40" alt="YouTube" title="YouTube" /> </a> </td> </tr> </table> </div>