Minor Project
Minor Project
ON
FOOD MASTER
Submitted in partial fulfillment of the requirement for the award of the degree of
BACHELOR OF COMPUTER APPLICATION (BCA)
Submitted by
Raghav Malhotra
BCA, Enroll No. 08991102022
1
DECLARATION
This Python project titled “FOOD MASTER” towards the completion of our course requirements
for Semester V is our original work.
The material borrowed from other sources and incorporated in the report has been duly
acknowledged and referenced.
I understand that I will be held liable and accountable for our project; it is all done without
having any copyright(s) of any of the organization. I further declare that the work reported in this
project has not been submitted and will not be submitted, either in part or in full, for the award of
any other degree or diploma in this institute or any other institute or university.
Raghav Malhotra
08991102022
CERTIFICATE
2
This is to certify that the project entitled: “FOOD MASTER” done by Raghav Malhotra
having university enrolment number 08991102022 is an authentic work carried out by me at SRI
GURU TEGH BAHADUR INSTITUTE OF MANAGEMENT & INFORMATION
TECHNOLOGY. The matter embodied in this project work has not been submitted earlier for
the award of any degree or diplomas to the best of my knowledge and belief. The suggestion as
approved by the faculty was duly incorporated.
DATE:
Dr Raj Kumar
ACKNOWLEDGEMENT
3
I am extremely grateful to our guide Dr Raj Kumar for being a source of inspiration and for her
constant support in the Design, Implementation and Evaluation of the project. I am thankful to
both for constant constructive criticism and invaluable suggestions, which benefited us a lot
while developing the project on “FOOD MASTER” a PhP based website.
He has been a constant source of inspiration and motivation for hard work. He has been very
cooperative throughout this project work with condor and pleasure. Through this column, it
would be our utmost pleasure to express our warm thanks to him for the encouragement, co-
operation and consent without which we mightn’t be able to accomplish this project.
DATE:
Raghav Malhotra
08991102022
4
ABSTRACT
In today's fast-paced world, ordering food online has become a necessity for many. This abstract
introduces a user-friendly food ordering website built with PHP, designed to make the process
smoother for customers and restaurant owners alike. Our goal is simple: to create a website
where ordering food is effortless and enjoyable. The website aims to bridge the gap between
restaurants and customers by providing a user-friendly interface where users can effortlessly
browse menus, place orders, and make payments online.
Using PHP, a versatile scripting language, we're crafting a platform that's intuitive and accessible
from any device. Imagine browsing through menus with ease, customizing orders, and securely
paying online—all in one place. That's what our website offers. Customers can create accounts
for personalized experiences, track orders in real-time, and receive notifications every step of the
way.
For restaurant owners, managing menus and tracking orders is made simple with our dedicated
admin panel. They can analyze sales data to optimize operations and ensure customer
satisfaction. With PHP at the core, our platform promises a seamless experience for everyone
involved. From browsing menus to tracking orders, we're transforming the food ordering process
for the better.
5
TABLE OF CONTENT
4. DATABASE DESIGN 23
4.1 INTRODUCTION 24
APPENDICES 37-52
REFERENCES 53
6
LIST OF TABLES
FIGURE PAGE NO
LIST OF SYMBOLS 19
DATABASE TABLE DETAILS 25
USER 25
CUSTOMER 25
RESTAURANT 25
ORDER 26
ORDER_ITEM 26
MENU 26
ITEM 26
7
LIST OF FIGURES
FIGURE PAGE NO
FIGURE1. USE CASE 17
FIGURE 2. DATA FLOW DIAGRAM LEVEL 0 20
FIGURE 3. DATA FLOW DIAGRAM LEVEL 1 21
FIGURE 4. DATA FLOW DIAGRAM LEVEL 2 22
FIGURE 4. ER DIAGRAM 27
8
CHAPTER 1
INTRODUCTION
9
1. INTRODUCTION
This food ordering system project in php based server side scripting focuses on dealing with
managing food orders and registering new restaurants with just few clicks. Also, the system
displays all the available food menus and carts. In addition, the system allows managing food
items. In an overview of this web application, a user can simply register and start using it.
Registered user just need to login with their username and password. Here, the system displays
all the available food menus where the user can add them to the cart. The user has to select
amongst the available food choices and add quantity. Each section contains its own prices. After
all, the user can check his/her cart, remove unwanted orders too during checkout. And finally,
after checking out and making choice between the available payment modes then the user can
checkout. After checkout, the user can view all the food orders under the Orders section.
On the other hand, we have a Admin panel. It includes management of food menu, prices,
quantity, order status and other order details such as delivery details etc.. The restaurant through
the passage of admin can simply add more food menus by providing details such as name,
description, price, and images attachment to it. Similarly, the user can check the order section to
list all the orders. Here, the restaurant can simply update on the status of order from the drop
down list to update the status of order. Or also, the restaurant can log in to the system and check
the orders section to list out all the orders. It displays order date, order items, customer’s name
with order status.
Last but not least, a clean and simple dashboard is presented with various color combinations for
greater user experience while using this Online Food Ordering System Project in php. Bootstrap
is on board with SQL as database. Presenting a new Food Order Management System Project in
php language which includes an restaurant panel with a customer that contains all the essential
features to follow up, and a knowledgeable resource for learning purposes.
Available Features:
Home Panel
Restaurant Panel
View Food Menu
Place Order
Add to Cart System
Admin Panel
Login Panel
Register Panel
My Orders Panel
10
1.1 SCOPE OF THE PROJECT
The “Food Master” is developed according the current need in different Fields. This is Online
Food Ordering Management System Website which provides facility of ordering food and
registering new restaurants easily. So by using this system users who places order will first
Register an account on this portal (if new user) otherwise Login through their Username and
Password, and then Select restaurant and then items which they want to order and add them to
cart and finally checkout by giving payment details. So by using this portal customer can easily
order food by sitting at home along with this new restaurant.
Fast working.
Easy to use.
One click access.
The capability given through the web ordering system is limited to that which is most essential to
accomplishing the desired task, as the goal of the system is to make the process of placing an
order as simple as possible for the consumer and making online restaurant registration simple
and hassle free. Every time a consumer puts an order, all of the functions listed above will be
employed, with the exception of Handling Admin panel. That is accessible to only the admin and
will allow them to manage the menu that is displayed to web ordering system users. Restaurant
employee also manages the orders placed.
The objective is to provide customer best and rich in flavour food items.
To make online ordering, billing and paying easier and convenient for you.
This system can enable the customers to access the facilities from sitting at their homes.
Making small restaurant grow online easily.
11
CHAPTER 2
REQUIREMENT ANALYSIS
12
2.1 SOFTWARE REQUIREMENTS SPECIFICATION
2.1.1 CATEGORY
Web Application
2.1.2 PURPOSE
The purpose of developing this online food ordering management system website titled ‘FOOD
MASTER’ is an effort made to provide an application that provides us the choicest range of food
items for customer and registering new restaurants. The design is so simple that the user won’t
find any difficulties while working on it.
Requirement that specifies criteria that can be used to judge the operation of a system are called
non-functional requirements. Non-functional requirements of our system are mentioned below:
Secure access of confidential data (user’s details).
Maximum time availability.
Flexible service-based architecture will be highly desirable for future extension.
Food registration and updating facility is accessible by restaurants employee only.
13
2.1.5 SOFTWARE TOOLS
DATABASE SERVER: SQLITE3
CLIENT: PHP.
DEVELOPMENT TOOLS: XAMPP Control
PROGRAMMING LANGUAGE: PHP, SQL, Html, JavaScript
PHP
PHP, or Hypertext Preprocessor, stands as a versatile server-side scripting language pivotal
in the creation of dynamic web pages and robust web applications. With its extensive library
support, seamless integration with databases, and straightforward syntax, PHP empowers
developers to craft interactive and feature-rich websites. From e-commerce platforms to
content management systems, PHP serves as the backbone of countless online experiences,
driving innovation and efficiency in web development.
SQLITE 3
SQLite is an in-process library that implements a self-contained, server less, zero-
configuration, transactional SQL database engine. It is a database, which is zero-configured,
which means like other databases you do not need to configure it in your system. SQLite
engine is not a standalone process like other databases, you can link it statically or
dynamically as per your requirement with your application. SQLite accesses its storage files
directly.
HTML
HTML, or Hypertext Markup Language, forms the foundation of the World Wide Web,
defining the structure and content of web pages. Through its simple and intuitive markup
tags, HTML enables developers to create cohesive and visually engaging online experiences.
From defining headings and paragraphs to embedding multimedia content and creating
interactive forms, HTML empowers creators to craft immersive and accessible web content
that resonates with audiences across the globe.
XAMPP
XAMPP represents a comprehensive web development solution, facilitating local web server
environments for testing and development purposes. With its seamless integration of
Apache, MySQL, PHP, and Perl, XAMPP provides developers with a robust toolkit for
building and deploying web applications offline. Whether for prototyping new ideas,
debugging code, or creating local development environments, XAMPP streamlines the web
development process, empowering developers to unleash their creativity without constraints.
14
2.1.6 DEPLOYEMENT
Operating System Server: Windows 10.
In the Unified Modeling Language (UML), a use case diagram can summarize the details of your
system's users (also known as actors) and their interactions with the system. To build one, you'll
use a set of specialized symbols and connectors.
Actor
Someone interacts with use case
(system function).
Named by noun.
Actor plays a role in the business
Similar to the concept of user, but a
user can play different roles
Actor triggers use case(s).
Actor has a responsibility toward the
system (inputs), and Actor has
expectations from the system
(outputs).
Use Case
System function (process - automated
or manual)
Named by verb + Noun (or Noun
Phrase).
i.e. Do something
Each Actor must be linked to a use
case, while some use cases may not be
linked to actors.
Communication Link
The participation of an actor in a use
case is shown by connecting an actor
to a use case by a solid link.
Actors may be connected to use cases
by associations, indicating that the
actor and the use case communicate
with one another using messages.
15
Boundary of system
The system boundary is potentially the
entire system as defined in the
requirements document.
For large and complex systems, each
module may be the system boundary.
can form a system boundary for use
cases specific to each of these
business functions.
The entire system can span all of these
modules depicting the overall system
boundary
16
Registratio
n
Login
Add Item
Remove
Item
Pay Order
Update
menu
Receive
Order
Update
stauts
Order
Confimatio
Checkout
17
CHAPTER 3
SOFTWARE DESIGN
18
3.1 INTRODUCTION
This chapter will focus on the design of the system using diagrams to illustrate
graphically certain sections of software system. This article/tutorial will teach the
basis of relational data base design and explains how to make a good database design.
It is a rather long text, but we advise to read all of it. Designing a data base is in fact
fairly easy, but the rear a few rules to stick to. It is important to know what these rules
are, but more importantly is to know why these rules exist, otherwise you will tend to
make mistakes!
19
3.3 DFD LEVEL 0
20
3.4 DFD LEVEL 1
21
22
FIG.3 DFD 1
24
CHAPTER 4
DATABASE DESIGN
25
4.1 INTRODUCTION
In software engineering, an entity–relationship model (ER model) is a data model for describing
the data or information aspects of a business domain or its process requirements, in an abstract
way that lends itself to ultimately being implemented in a database such as a relational database.
The main components of ER models are entities (things) and the relationships that can exist
among them. It has following symbols:
• Entities are objects or concepts that represent important data. They are typicallynouns, e.g.,
customer, supervisor, location, or promotion. It is denoted by a rectanglebox as shown: -
• Relationships are meaningful associations between oramong entities. They areusually verbs,
e.g., assign, associate, or track. A relationship provides useful informationthat could not be
discerned with just the entity types. It is described by a diamond: -
26
4.2 DATBASE TABLES
USER
NAME TYPE CONSTRAINT
ISCUSTOMER BOOLEAN DEFAULT
ISRESTAURANT BOOLEAN DEFAULT
USER CHAR PRIMARY KEY
EMAIL VARCHAR NOT NULL
PASSWORD VARCHAR NOT NULL
CUSTOMER
NAME TYPE CONSTRAINT
USER CHAR FOREIGN KEY
F_NAME CHAR ----
L_NAME CHAR ----
CITY CHAR ----
PHONE CHAR ----
ADDRESS TEXT ----
RESTAURANT
NAME TYPE CONSTRAINT
USER CHAR FOREIGN KEY
R_NAME CHAR ----
INFO CHAR ----
MIN_ORD CHAR ----
LOCATION CHAR ----
R_LOGO FILE ----
STATUS CHAR DEFAULT
APPROVED BOOLEAN DEFAULT
ORDER
NAME TYPE CONSTRAINT
ID INTEGER PRIMARY KEY
TOTAL_AMOUNT INTEGER DEFAULT
TIMESTAMP DATETIME ----
DELIVERY_ADDR CHAR ----
ORDERED_BY CHAR FOREIGN KEY
R_ID INTEGER FOREIGN KEY
27
ORDER_ITEM
ID INTEGER PRIMARY KEY
ITEM_ID INTEGER FOREIGN KEY
ORD_ID INTEGER FOREIGN KEY
QUANTITY INTEGER DEFAULT
MENU
NAME TYPE CONSTRAINT
ID INTEGER PRIMARY KEY
ITEM_ID INTEGER FOREIGN KEY
R_ID INTEGER FOREIGN KEY
PRICE INTEGER -----
QUANTITY INTEGER DEFAULT
ITEM
NAME TYPE CONSTRAINT
ID INTEGER PRIMARY KEY
FNAME CHAR -----
CATEGORY CHAR -----
28
4.3 ER DIAGRAM
FIG.4 ER DIAGRAM
29
CHAPTER 5
TESTING
30
5.1 INTRODUCTION
The testing of software means measuring or accessing the software to determine the quality.
Testing is a measuring instrument for software quality with the unit of measurement being the
number of defects found during testing. Testing activities also help to achieve software quality.
Testing is essential in the development of any system software. Testing is essential in the
development of any software system.
31
5.3 TEST CASES TABLE
3. Unsuccessful USER Login to the system Login should fail with Passed
Verification [LOGIN] with a wrong an error. ‘YOU ARE
due to wrong password password or user NOT REGISTERED
or user name name. AS USER’.
4. Successfully searching User types restaurant The restaurant Passed
restaurant. name in the search searched is shown on
panel. the screen
5. Successfully CUSTOMER select Data to be stored in Passed
CUSTOMER places item quantity and database and show
order. places order. customer order details
in cart.
32
CHAPTER 6
ROLES AND RESPONSIBILITIES
33
6.1. PROJECT ROLE AND RESPONSIBILTY
34
CHAPTER 7
CONCLUSIONS AND
FUTURE ENHANCEMENTS
35
CONCLUSION
The entire project has been developed and deployed as per the requirements. It is found to be bug
free as per the testing standards that are implemented and by specification-untraced errors
concentrated in the coming versions, which are planned to be developed in near future. Finally,
we would like to conclude that we have put all our efforts throughout the development of our
project and tried to fulfill most of the requirements of the user.
FUTURE SCOPE
36
APPENDICES
Index Page:
<!DOCTYPE html>
<html lang="en">
<?php
include("connection/connect.php");
error_reporting(0);
session_start();
?>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="#">
<title>Home</title>
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/font-awesome.min.css" rel="stylesheet">
<link href="css/animsition.min.css" rel="stylesheet">
<link href="css/animate.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet"> </head>
<body class="home">
37
<?php
if(empty($_SESSION["user_id"])) // if user is not login
{
echo '<li class="nav-item"><a href="login.php" class="nav-link
active">Login</a> </li>
<li class="nav-item"><a href="registration.php" class="nav-link
active">Register</a> </li>';
}
else
{
?>
</ul>
</div>
</div>
</nav>
</header>
<div class="banner-form">
<form class="form-inline">
</form>
</div>
<div class="steps">
<div class="step-item step1">
<svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 483 483" width="512"
height="512">
<g fill="#FFF">
<path d=" "></path>
38
<path d="M202.494 386h22c5.799 0 10.5-4.701 10.5-10.5s-4.701-10.5-10.5-
10.5h-22c-5.799 0-10.5 4.701-10.5 10.5s4.701 10.5 10.5 10.5z"></path>
</g>
</svg>
<h4><span style="color:white;">1. </span>Choose Restaurant</h4> </div>
</div>
</div>
</div>
</section>
<section class="popular">
<div class="container">
<div class="title text-xs-center m-b-30">
<h2>Popular Dishes of the Month</h2>
<p class="lead">Easiest way to order your favourite food among these top 6
dishes</p>
</div>
<div class="row">
<?php
$query_res= mysqli_query($db,"select * from dishes LIMIT 6");
while($r=mysqli_fetch_array($query_res))
{
</div>
</div>';
}
?>
</div>
</div>
</section>
<section class="how-it-works">
<div class="container">
<div class="text-xs-center">
<h2>Easy to Order</h2>
<div class="row how-it-works-solution">
<div class="col-xs-12 col-sm-12 col-md-4 how-it-works-steps white-txt col1">
<div class="how-it-works-wrap">
<div class="step step-1">
<div class="icon" data-step="1">
<svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 483 483"
width="512" height="512">
<g fill="#FFF">
<path d=" " /> </g>
</svg>
</div>
<h3>Choose a restaurant</h3>
<p>We"ve got your covered with menus from a variety of delivery
restaurants online.</p>
</div>
</div>
</div>
<div class="col-xs-12 col-sm-12 col-md-4 how-it-works-steps white-txt col2">
<div class="step step-2">
<div class="icon" data-step="2">
<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512"
viewbox="0 0 380.721 380.721">
<g fill="#FFF">
<path d=" " /> </g>
</svg>
</div>
40
<h3>Choose a dish</h3>
<p>We"ve got your covered with a variety of delivery restaurants online.</p>
</div>
</div>
<div class="col-xs-12 col-sm-12 col-md-4 how-it-works-steps white-txt col3">
<div class="step step-3">
<div class="icon" data-step="3">
<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512"
viewbox="0 0 612.001 612">
<path d=" " /> </svg>
</div>
<h3>Pick up or Delivery</h3>
<p>Get your food delivered! And enjoy your meal! </p>
</div>
</div>
</div>
</div>
<!-- <div class="row">
<div class="col-sm-12 text-center">
<p class="pay-info">Cash on Delivery</p>
</div> -->
</div>
</div>
</section>
<section class="featured-restaurants">
<div class="container">
<div class="row">
<div class="col-sm-4">
<div class="title-block pull-left">
<h4>Featured Restaurants</h4> </div>
</div>
<div class="col-sm-8">
<div class="restaurants-filter pull-right">
<nav class="primary pull-left">
<ul>
<li><a href="#" class="selected" data-filter="*">all</a> </li>
<?php
$res= mysqli_query($db,"select * from res_category");
while($row=mysqli_fetch_array($res))
{
echo '<li><a href="#" data-filter=".'.$row['c_name'].'"> '.
$row['c_name'].'</a> </li>';
}
?>
41
</ul>
</nav>
</div>
</div>
</div>
<div class="row">
<div class="restaurant-listing">
<?php
$ress= mysqli_query($db,"select * from restaurant");
while($rows=mysqli_fetch_array($ress))
{
Registration Page:-
<!DOCTYPE html>
<html lang="en">
<?php
session_start();
error_reporting(0);
include("connection/connect.php");
if(isset($_POST['submit'] ))
43
{
if(empty($_POST['firstname']) ||
empty($_POST['lastname'])||
empty($_POST['email']) ||
empty($_POST['phone'])||
empty($_POST['password'])||
empty($_POST['cpassword']) ||
empty($_POST['cpassword']))
{
$message = "All fields must be Required!";
}
else
{
if($_POST['password'] != $_POST['cpassword']){
header("refresh:0.1;url=login.php");
}
}
?>
<div class="page-wrapper">
<div class="container">
<ul>
</ul>
</div>
<section class="contact-page inner-page">
<div class="container ">
<div class="row ">
<div class="col-md-12">
<div class="widget" >
<div class="widget-body">
</div>
<div class="row">
<div class="col-sm-4">
<p> <input type="submit" value="Register" name="submit" class="btn
theme-btn"> </p>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div> </section>
46
Your Orders:-
<!DOCTYPE html>
<html lang="en">
<?php
include("connection/connect.php");
error_reporting(0);
session_start();
if(empty($_SESSION['user_id']))
{
header('location:login.php');
}
else
{
?>
<div class="page-wrapper">
</div>
<div class="result-show">
<div class="container">
<div class="row">
</div>
</div>
</div>
<section class="restaurants-page">
<div class="container">
<div class="row">
<div class="col-xs-12">
</div>
<div class="col-xs-12">
<div class="bg-gray">
<div class="row">
</tr>
</thead>
<tbody>
<?php
49
SCREENSHOTS
Login Page:-
Add To Cart
50
Ordering Using Given Payment Options
Confirmed Order
51
Order Being Placed
52
References
https://www.google.com
https://www.youtube.com
https://www.wikipedia.com
https://www.w3schools.com
https://www.pexels.com
https://stackoverflow.com
'Python Crash Course' by Eric Matthews
Django for Beginners: Build websites with Python and Django by William S. Vincent
53