0% found this document useful (0 votes)
17 views53 pages

Minor Project

Minor project documentation of BCA course Food delivery system full documentation

Uploaded by

Luckykumar Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views53 pages

Minor Project

Minor project documentation of BCA course Food delivery system full documentation

Uploaded by

Luckykumar Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 53

A PROJECT REPORT

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

UNDER THE GUIDANCE OF


Ms. Rachna Singh

SRI GURU TEGH BAHADUR INSTITUTE OF MANAGEMENT


AND INFORMATION TECHNOLOGY
(AFFILIATED TO GURU GOBIND SINGH INDRAPRASTHA
UNIVERSITY,DELHI)
(2022-2025)

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

GUIDE: 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

CHAPTER NO. TOPIC PAGE NO.


1. INTRODUCTION 9
1. INTRODUCTION TO THE PROJECT 10
1.1 SCOPE OF THE PROJECT 11
1.2 OBJECTIVE OF THE PROJECT 11
2. REQUIRMENT ANALYSIS 12

2.1 SOFTWARE REQUIRMENT ANALYSIS 13-15

2.2 USE CASE DIAGRAM 15-17


3. SOFTWARE DESIGN 18
3.1 INTRODUCTION 19
3.3 DATA FLOW DIAGRAM (LEVEL O) 20

3.4 DATA FLOW DIAGRAM (LEVEL 1) 21

3.5 DATA FLOW DIAGRAM (LEVEL 2) 22

4. DATABASE DESIGN 23

4.1 INTRODUCTION 24

4.2 DATABASE FIELD SEPCIFICATION 25-26

4.3 ENTITY RELATIONSHIP DEIAGRAM 27


5. TESTING 28
5.1 INTRODUCTION 29

5.2 TEST CASE 39-31

6. ROLES AND RESPONSIBILTY 32


6.1 PROJECTS ROLE AND RESPONSIBILITY 34

7. CONCLUSION AND ACHIEVEMENTS 35

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.

1.2 OBJECTIVE OF THE PROJECT

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.

2.1.3 FUNCTIONAL REQUIREMENTS


“Functional requirement describes what a system should do.” Functional requirements of our
system are explained below:
 Users must have valid User Id and password to login, thus creating their individual
profiles.
 Restaurants can update menu items through admin.
 Customer can choose food item.
 Customer can add quantity.
 All of the chosen food item should be confirmed by the customer for further checking
out.
 Customers are able to modify and cancel the order.
 Customers are provided with their proper order details.
 Customers are able to make cash payments on delivery of food or do E-Payment.
 Customers should be told about the successful placement of order and the estimated
delivery date.
 Users can easily logout from website.

2.1.4 NON-FUNCTIONAL REQUIREMENTS

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.

2.1.7 HARDWARE TOOLS


Processor: I5 processor.
RAM: 8GB RAM.

2.2 USE CASE DIAGRAM

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.

Notation Description Visual Representation

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

FIG.1 USE CASE DIAGRAM

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!

3.2 HIGH LEVEL/DETAILED DESIGN (HLD/DD)


3.2.1 Data flow Diagrams (DFDs)
As information moves through software, it is modified by a series of transformations. A data
flow diagram is a graphical representation that depicts information flow and the transforms that
are applied as data move from input to output.
The data flow diagram may be used to represent a system or software at any level of abstraction.
In fact, DFDs may be partitioned into levels that represent increasing information flow and
functional detail. Therefore, the DFD provides a mechanism for functional modeling as well as
information flow modeling.

3.2.2 Symbols used in data flow diagrams

19
3.3 DFD LEVEL 0

FIG.2 DFD LEVEL 0

Registration/ Login Admin Login

Order Food Food Add Dishes


Customer Add Item
App Check On Admin
To Cart Customer Details
Remove Payment Update Order Status

20
3.4 DFD LEVEL 1

21
22
FIG.3 DFD 1

3.4 DFD LEVEL 2


23
FIG.4 DFD 2

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: -

• Attributes are characteristics of either an entity, a many-to-many relationship, or aone-tone


relationship. It is represented by an oval: -

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.

5.2 LEVELS OF TESTING


5.2.1 Unit Testing
Unit testing comprises the set of tests performed usually by the programmers prior tothe
integration of the unit in to a large Program. This is the lowest level of testing and isdone by the
programmer (Who develops it) who can test it in great detail.

5.2.2 System Testing


After in integration testing is completed, the entire system is tested as whole. Thefunctional
specifications or requirements specification are used to derive the test case.At this level the
system testing looksfor errors in the end-to-end functional quality.Attributes such as
performance, reliability, volume, stress tolerance, usability,maintainability, security etc.
Independent testers can carry out this testing.

5.2.3 Integration System


Integration testing is defined as the testing of combined parts of an application to determine if
they function correctly. Integration testing can be done in two ways: Bottom-up integration
testing and Top-down integration testing.

5.2.4 Regression Testing


Regression testing is performed to verify that a fixed bug hasn't resulted in another functionality
or business rule violation. The intent of regression testing is to ensure that a change, such as a
bug fix should not result in another fault being uncovered in the application.

5.2.5 Acceptance Testing


Acceptance tests are not only intended to point out simple spelling mistakes, cosmetic errors, or
interface gaps, but also to point out any bugs in the application that will result in system crashes
or major errors in the application.

5.2.6 Alpha Testing


This test is the first stage of testing and will be performed amongst the teams (developer and
QA teams). Unit testing, integration testing and system testing when combined together is
known as alpha testing.

31
5.3 TEST CASES TABLE

NO. TEST CASE TITLE DESCRIPTION EXPECTED RESULT


OUTCOMES
1. Successful USER USER is asked to fill Data is stored and the Passed
REGISTRATION certain details. USER become
REGISTERED USER
in the website
2. Successful USER The login to the Login should be Passed
Verification [LOGIN] system should be tried successful and the
with the USER user should be able to
NAME and the correct log in.
PASSWORD.

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.

6. Unsuccessful order CUSTOMER doesn’t Alert is shown “ no Passed


placement. select item or quantity item selected”
and places order.
7. Successfully shows A page containing Web page shows all Passed
order details. details of items order details of the
purchased along with customer.
its quantity, price and
then provide mode of
payment
8. Successfully user The user must choose User gets option to Passed
reaches payment between the two choose between COD
gateway. payment options. and E-Payment.
9. Successfully seeing After proper payment A page with delivery Passed
order confirmation. done. User is sent to boy name and phone
next page. number is showed to
user.

32
CHAPTER 6
ROLES AND RESPONSIBILITIES

33
6.1. PROJECT ROLE AND RESPONSIBILTY

We worked as Web developer, Designer & Tester of the application.


Also, learned how important deadlines are, and that clients are like god, we just have to provide
them what they want. The ultimate goal is to meet client’s requirements provides options for
viewing varieties of Food and provides customers with the facility to order, modify or cancel a
particular product.
In this project my contribution was towards implementing the logics, functioning and
implementation of code. We added all the functions presented in the project i.e. functions like
registering, sign up, ordering, canceling, feedback, payment mode etc.
Responsibilities: Work on definition of development requirements and priorities like Data
migration, Interfaces with other systems and Development and operation of technical testing
programs

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

• More animation can be added to make the site more attractive.


• Order tracking can be implemented.
• GPS tracker for CUSTOMER can also be implemented to auto detects delivery address.
• Different filters can be provided for fast access.
• A preference module can be included in the system. This module can be used to show the
customer preference according to their last purchase.
• A chat helpline could be added for users who might find difficult to access the website.
• Restaurants can add requirement panel to understand customer taste and can prepare food
accordingly.

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">

<header id="header" class="header-scroll top-header headrom">


<nav class="navbar navbar-dark">
<div class="container">
<button class="navbar-toggler hidden-lg-up" type="button" data-toggle="collapse"
data-target="#mainNavbarCollapse">&#9776;</button>
<a class="navbar-brand" href="index.php"> <img class="img-rounded"
src="images/icn.png" alt=""> </a>
<div class="collapse navbar-toggleable-md float-lg-right" id="mainNavbarCollapse">
<ul class="nav navbar-nav">
<li class="nav-item"> <a class="nav-link active" href="index.php">Home <span
class="sr-only">(current)</span></a> </li>
<li class="nav-item"> <a class="nav-link active"
href="restaurants.php">Restaurants <span class="sr-only"></span></a> </li>

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
{

echo '<li class="nav-item"><a href="your_orders.php" class="nav-link


active">My Orders</a> </li>';
echo '<li class="nav-item"><a href="logout.php" class="nav-link
active">Logout</a> </li>';
}

?>

</ul>

</div>
</div>
</nav>

</header>

<section class="hero bg-image" data-image-src="images/img/pimg.jpg">


<div class="hero-inner">
<div class="container text-center hero-text font-white">
<h1>Order Delivery & Take-Out </h1>

<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 class="step-item step2">


<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>
<h4><span style="color:white;">2. </span>Order Food</h4> </div>

<div class="step-item step3">


<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512"
viewbox="0 0 612.001 612">
<path d=" " /> </svg>
<h4><span style="color:white;">3. </span>Delivery or take out</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))
{

echo ' <div class="col-xs-12 col-sm-6 col-md-4 food-item">


<div class="food-item-wrap">
<div class="figure-wrap bg-image"
data-image-src="admin/Res_img/dishes/'.$r['img'].'"></div>
<div class="content">
<h5><a
href="dishes.php?res_id='.$r['rs_id'].'">'.$r['title'].'</a></h5>
39
<div class="product-name">'.$r['slogan'].'</div>
<div class="price-btn-block"> <span
class="price">₹'.$r['price'].'</span> <a href="dishes.php?res_id='.$r['rs_id'].'" class="btn theme-
btn-dash pull-right">Order Now</a> </div>
</div>

</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))
{

$query= mysqli_query($db,"select * from res_category where


c_id='".$rows['c_id']."' ");
$rowss=mysqli_fetch_array($query);

echo ' <div class="col-xs-12 col-sm-12 col-md-6 single-restaurant


all '.$rowss['c_name'].'">
<div class="restaurant-wrap">
<div class="row">
<div class="col-xs-12 col-sm-3 col-md-12 col-lg-3 text-xs-
center">
<a class="restaurant-logo" href="dishes.php?res_id='.
$rows['rs_id'].'" > <img src="admin/Res_img/'.$rows['image'].'" alt="Restaurant logo"> </a>
</div>
<div class="col-xs-12 col-sm-9 col-md-12 col-lg-9">
<h5><a href="dishes.php?res_id='.$rows['rs_id'].'" >'.
$rows['title'].'</a></h5> <span>'.$rows['address'].'</span>
</div>
</div>
</div>
</div>'; }
?>
</div>
</div> </div>
</section>
<footer class="footer">
<div class="container">
<div class="bottom-footer">
42
<div class="row">
<div class="col-xs-12 col-sm-3 payment-options color-gray">
<h5>Payment Options</h5>
<ul>
<li>
<a href="#"> <img src="images/paypal.png" alt="Paypal"> </a>
</li>
<li>
<a href="#"> <img src="images/mastercard.png" alt="Mastercard"> </a>
</li>
<li>
<a href="#"> <img src="images/maestro.png" alt="Maestro"> </a>
</li>
<li>
<a href="#"> <img src="images/stripe.png" alt="Stripe"> </a>
</li>
<li>
<a href="#"> <img src="images/bitcoin.png" alt="Bitcoin"> </a>
</li>
</ul>
</div>
<div class="col-xs-12 col-sm-4 address color-blue">
<h5>Address</h5>
<p>Husdon Lane Kalyan Vihar, New Delhi </p>
<h5>Phone: 75696969855</a></h5> </div>
<div class="col-xs-12 col-sm-5 additional-info color-blue">
<h5>Addition informations</h5>
<p>Join thousands of other restaurants who benefit from having partnered
with us.</p></div>
</div>
</div>
</div>
</footer> </body> </html>

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
{

$check_username= mysqli_query($db, "SELECT username FROM users where username = '".


$_POST['username']."' ");
$check_email = mysqli_query($db, "SELECT email FROM users where email = '".
$_POST['email']."' ");

if($_POST['password'] != $_POST['cpassword']){

echo "<script>alert('Password not match');</script>";


}
elseif(strlen($_POST['password']) < 6)
{
echo "<script>alert('Password Must be >=6');</script>";
}
elseif(strlen($_POST['phone']) < 10)
{
echo "<script>alert('Invalid phone number!');</script>";
}

elseif (!filter_var($_POST['email'], FILTER_VALIDATE_EMAIL))


{
echo "<script>alert('Invalid email address please type a valid email!');</script>";
}
elseif(mysqli_num_rows($check_username) > 0)
{
echo "<script>alert('Username Already exists!');</script>";
}
elseif(mysqli_num_rows($check_email) > 0)
{
44
echo "<script>alert('Email Already exists!');</script>";
}
else{

$mql = "INSERT INTO users(username,f_name,l_name,email,phone,password,address)


VALUES('".$_POST['username']."','".$_POST['firstname']."','".$_POST['lastname']."','".
$_POST['email']."','".$_POST['phone']."','".md5($_POST['password'])."','".$_POST['address']."')";
mysqli_query($db, $mql);

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">

<form action="" method="post">


<div class="row">
<div class="form-group col-sm-12">
<label for="exampleInputEmail1">User-Name</label>
<input class="form-control" type="text" name="username" id="example-
text-input">
</div>
<div class="form-group col-sm-6">
<label for="exampleInputEmail1">First Name</label>
<input class="form-control" type="text" name="firstname" id="example-
text-input">
</div>
<div class="form-group col-sm-6">
<label for="exampleInputEmail1">Last Name</label>
45
<input class="form-control" type="text" name="lastname" id="example-
text-input-2">
</div>
<div class="form-group col-sm-6">
<label for="exampleInputEmail1">Email Address</label>
<input type="text" class="form-control" name="email"
id="exampleInputEmail1" aria-describedby="emailHelp">
</div>
<div class="form-group col-sm-6">
<label for="exampleInputEmail1">Phone number</label>
<input class="form-control" type="text" name="phone" id="example-tel-
input-3">
</div>
<div class="form-group col-sm-6">
<label for="exampleInputPassword1">Password</label>
<input type="password" class="form-control" name="password"
id="exampleInputPassword1">
</div>
<div class="form-group col-sm-6">
<label for="exampleInputPassword1">Confirm password</label>
<input type="password" class="form-control" name="cpassword"
id="exampleInputPassword2">
</div>
<div class="form-group col-sm-12">
<label for="exampleTextarea">Delivery Address</label>
<textarea class="form-control" id="exampleTextarea" name="address"
rows="3"></textarea>
</div>

</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 class="inner-page-hero bg-image" data-image-src="images/img/pimg.jpg">


<div class="container"> </div>

</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">

<table class="table table-bordered table-hover">


<thead style = "background: #404040; color:white;">
<tr>
47
<th>Item</th>
<th>Quantity</th>
<th>Total Price</th>
<th>Status</th>
<th>Date</th>
<th>Action</th>

</tr>
</thead>
<tbody>

<?php

$query_res = mysqli_query($db, "SELECT *, price + IF(price < 500, 150, 100) AS


total_price FROM users_orders WHERE u_id='{$_SESSION['user_id']}'");
if(!mysqli_num_rows($query_res) > 0 )
{
echo '<td colspan="6"><center>You have No orders Placed
yet. </center></td>';
}
else
{
while($row=mysqli_fetch_array($query_res))
{
?> <tr>
<td data-column="Item"> <?php echo $row['title']; ?></td>
<td data-column="Quantity"> <?php echo $row['quantity']; ?
></td>
<td data-column="Total Price">₹<?php echo
$row['total_price']; ?></td>
<td data-column="status">
<?php
$status=$row['status'];
if($status=="" or $status=="NULL")
{
?>
<button type="button" class="btn btn-info"><span
class="fa fa-bars" aria-hidden="true" ></span> Dispatch</button>
<?php
}
if($status=="in process")
48
{ ?>
<button type="button" class="btn btn-
warning"><span class="fa fa-cog fa-spin" aria-hidden="true" ></span> On The Way!</button>
<?php
}
if($status=="closed")
{
?>
<button type="button" class="btn btn-success"
><span class="fa fa-check-circle" aria-hidden="true"></span> Delivered</button>
<?php
}
?>
<?php
if($status=="rejected")
{
?>
<button type="button" class="btn btn-danger"> <i
class="fa fa-close"></i> Cancelled</button>
<?php
}
?>
</td>
<td data-column="Date"> <?php echo $row['date']; ?></td>
<td data-column="Action"> <a href="delete_orders.php?
order_del=<?php echo $row['o_id'];?>" onclick="return confirm('Are you sure you want to
cancel your order?');" class="btn btn-danger btn-flat btn-addon btn-xs m-b-10"><i class="fa fa-
trash-o" style="font-size:16px"></i></a>
</td>
</tr>
<?php }} ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div></div > </section>

49
SCREENSHOTS

Login Page:-

Add To Cart

50
Ordering Using Given Payment Options

Confirmed Order

51
Order Being Placed

Details in your orders

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

You might also like