The SuperMarketApp is a web-based application designed to manage supermarket operations such as user authentication, inventory management, order processing, and sales tracking. It is built using PHP and MySQL, providing a robust and scalable solution for small to medium-sized supermarkets.
- PHP: Server-side scripting.
- MySQL: Database management.
- HTML/CSS: Front-end structure and styling.
- JavaScript: Client-side scripting.
- jQuery: JavaScript library for simplified scripting.
- User authentication and session management.
- Inventory management for products.
- Order processing and tracking.
- Sales records and reporting.
- User-friendly interface with responsive design.
- Install XAMPP for an easy Apache distribution containing MySQL, PHP, and Perl.
-
Install XAMPP:
- Download and install XAMPP from the official website.
- During installation, choose the components you need (make sure Apache and MySQL are selected).
-
Change Ports for Apache (if necessary):
- If Apache cannot start, it may be due to port conflicts.
- Open
XAMPP Control Panel
, clickConfig
next to Apache, and openhttpd.conf
. - Change the
Listen
port from80
to8080
:Listen 8080
- Open
httpd-ssl.conf
and change theListen
port from443
to8443
:Listen 8443
-
Clone the Repository:
git clone https://github.com/datpham0412/SuperMarketApp.git cd SuperMarketApp
-
Move Project to XAMPP htdocs:
- Move the
SuperMarketApp
folder to theC:\xampp\htdocs
directory.
- Move the
-
Import Database into phpMyAdmin:
- Start Apache and MySQL from the XAMPP Control Panel.
- Open your web browser and go to
http://localhost/phpmyadmin
. - Create a new database named
market_database
. - Import the
database.sql
file into themarket_database
.
-
Configure Database Connection:
- Ensure the database connection settings in
db_connection.php
are correct:<?php function openConnection() { $servername = "localhost"; $username = "root"; $password = ""; $dbname = "market_database"; $connection = new mysqli($servername, $username, $password, $dbname); if ($connection->connect_error) { die("Connection failed: " . $connection->connect_error); } return $connection; } function closeConnection($connection) { $connection->close(); } ?>
- Ensure the database connection settings in
-
Launch the Application:
- Open your web browser and navigate to
http://localhost:8080/SuperMarketApp/login.php
.
- Open your web browser and navigate to
This project is licensed under the MIT License - see the LICENSE file for details.
For any inquiries, please contact tiendat041202@gmail.com.
Made with ❤️ by Dat Pham