Food Order Management Final Report
Food Order Management Final Report
Food Order Management Final Report
Chapter 1
Introduction
1.1 OBJECTIVES
The online food ordering system has been developed to override the problems
prevailing in the practicing manual system. This software is supported to eliminate
and, in some cases, reduce the hardships faced by this existing system.
The main objective of the online food ordering system is to manage the details of
item category, food, delivery address, shopping cart. It manages all the information
about item category, customer, shopping cart. The purpose of the project is to build
an application program to reduce the manual work.
The application is used as much as possible to avoid errors while entering the data. It
also provides error message while entering invalid data. No formal knowledge is
needed for the user to use this system. Thus, it proves that it is user-friendly. Online
Food Ordering System, as described above, can lead to error free, secure, reliable and
fast management system.
Online Food Ordering System is a user friendly php/MySQL based project which
helps users to book movie tickets with ease.
The main goal of this project is to provide movie tickets to customers with a simple
interface.
The web page uses html, css and JavaScript in the front end for better appearance and
better interaction with the users, a database engine known as MySQL is used for
storing and retrieving information from the database.
It was developed using a software known as Brackets which is particularly used for
web development.
1.2DBMS
A database management system (DBMS) is system software for creating and
managing databases. The DBMS provides users and programmers with a systematic
way to create, retrieve, update and manage data.
A DBMS makes it possible for end users to create, read, update and delete data in a
database. The DBMS essentially serves as an interface between the database and end
users or application programs, ensuring that data is consistently organized and
remains easily accessible.
1.3 PHP
Chapter 2
REQUIREMENTS SPECIFICATION
Technology Used:
CSS - Cascading Style Sheets (CSS) is a style sheet language used for
describing the presentation of a document written in a mark-up language.[1]
Although most often used to set the visual style of web pages and user interfaces
written in HTML and XHTML, the language can be applied to any XML
document, including plain XML, SVG and XUL, and is applicable to rendering in
speech, or on other media. Along with HTML and JavaScript, CSS is a
cornerstone technology used by most websites to create visually engaging
webpages, user interfaces for web applications, and user interfaces for many
mobile applications.
like ISAM or VSAM, SQL offers two main advantages: first, it introduced the
concept of accessing many records with one single command; and second, it
eliminates the need to specify how to reach a record, e.g. with or without an
index.
XAMPP - XAMPP is a free and open source cross-platform web server solution
stack package developed by Apache Friends, consisting mainly of the Apache
HTTP Server, MariaDB database, and interpreters for scripts written in the PHP
and Perl programming languages. XAMPP stands for Cross-Platform (X), Apache
(A), MariaDB (M), PHP (P) and Perl (P). It is a simple, lightweight Apache
distribution that makes it extremely easy for developers to create a local web
server for testing and deployment purposes. Everything needed to set up a web
server – server application (Apache), database (MariaDB), and scripting language
(PHP) – is included in an extractable file. XAMPP is also cross-platform, which
means it works equally well on Linux, Mac and Windows.
Chapter 3
System Design
The purpose of the design phase is to develop a clear understanding of what the
developer wants people to gain from his/her project. As the developer works on the
project, the test for every design decision should be efficient.
A purpose statement affects the design process by explaining what the developer wants
the project to do, rather than describing the project itself. The Design Document will
verify that the current design meets all of the explicit requirements contained in the
system model as well as the implicit requirements desired by the customer.
Data Design:
This relationship diagram shows how the tables in the database are connected to each
other and how the control flows from one table to another when some action is triggered
by the user. It also shows the constraints on the database such as primary key constraints,
foreign key constraints and procedures and triggers. Entity Relationship Diagram is also
called ER Diagram.
When documenting a system or process, looking at the system in multiple ways increases
the understanding of that system. ERD diagrams are commonly used in conjunction with
a data flow diagram to display the contents of a data store. They help us to visualize how
data is connected in a general way, and are particularly useful for constructing a
relational database
The database is normalized up to “third” normal form. That is the tables in the database
will not have any multi valued fields(attributes) and there will be one primary key in each
table that uniquely identifies each tuple in the table.
SCHEMA DIAGRAM:
The Schema Diagram gives us the information about the attributes in the table of the
database and how the given tables are related to each other.
Architectural design
Logical design
The logical design of a system pertains to an abstract representation of the data flows,
inputs and outputs of the system. This is often conducted via modelling, using an over-
abstract (and sometimes graphical) model of the actual system. In the context of systems,
designs are included. Logical design includes ER diagrams.
Physical design
The physical design relates to the actual input and output processes of the system. This is
explained in terms of how data is input into a system, how it is verified/authenticated,
how it is processed, and how it is displayed. In physical design, the following
requirements about the system are decided.
1. Input requirement,
2. Output requirements,
3. Storage requirements,
4. Processing requirements,
5. System control and backup or recovery.
Put another way, the physical portion of system design can generally be broken down
into three sub-tasks:
User Interface Design is concerned with how users add information to the system and
with how the system presents information back to them. Data Design is concerned with
how the data is represented and stored within the system. Finally, Process Design is
concerned with how data moves through the system, and with how and where it is
validated, secured and/or transformed as it flows into, through and out of the system. At
the end of the system design phase, documentation describing the three sub-tasks is
produced and made available for use in the next phase.
Physical design, in this context, does not refer to the tangible physical design of an
information system. To use an analogy, a personal computer's physical design involves
input via a keyboard, processing within the CPU, and output via a monitor, printer, etc. It
would not concern the actual layout of the tangible hardware, which for a PC would be a
monitor, CPU, motherboard, hard drive, modems, video/graphics cards, USB slots, etc. It
involves a detailed design of a user and a product database structure processor and a
control processor.
Creating a database:
Now that we have run and tested PHPmyadmin, the next step is running MySQL and creating a
database and table which will hold information to be used by our database. In order to start
MySQL, navigate to the xampp directory and run the mysql_start.bat batch file. The XAMPP
package contains an application called phpMyAdmin which allows developers to administer and
maintain MySQL databases. We will be using phpMyAdmin to create a database and table, and
enter test data. Before testing phpMyAdmin, make sure that both Apache and MySQL are
running by opening their respective batch files: apache_start.bat and mysql_start.bat.
The below picture shows how exactly the xampp phpmyadmin page looks like. All the sql
commands can be executed here.
Chapter 4
Implementation
The Login Window has two buttons, which will redirect to the required pages.
They are:
1. Login
2. Signup
index:
Consists of definition of login page objects.
Contains links to different redirect to different pages.
Contains html code for the user interface used in login page.
This window consists of the home page, which displays all the categories of food
available and also the best sellers. Information about the website is accessed by clicking on the about
us button, the contact information can be viewed by clicking on contact us button and logout button
is clicked to end session.
Mainmenu.php:
Contains html code for the button-based interface.
Consists of header with links to the respective food categories and add to cart buttons.
Contains the php code to select the items from the database and add to cart.
Consists of POST and SESSION variables to get the input from the form and from the
previous pages respectively.
Consists of member functions defined in php.
Quickbites.php:
Contains html code for the button-based interface.
Consists of header with links to the respective food categories and add to cart buttons.
Contains the php code to select the items from the database and add to cart.
Consists of POST and SESSION variables to get the input from the form and from the
previous pages respectively.
Consists of member functions defined in php.
Beverages.php:
Contains html code for the button-based interface.
Consists of header with links to the respective food categories and add to cart buttons.
Contains the php code to select the items from the database and add to cart.
Consists of POST and SESSION variables to get the input from the form and from the
previous pages respectively.
Desserts.php:
Contains html code for the button-based interface.
Consists of header with links to the respective food categories and add to cart buttons.
Contains the php code to select the items from the database and add to cart.
Consists of POST and SESSION variables to get the input from the form and from the
previous pages respectively.
Consists of member functions defined in php.
Myaccount.php:
Contains html code for the buttons used in the interface.
Consists of member functions defined in php.
It allows the user to create their own profile and make changes.
Profile.inc.php
Contains html code for the buttons used in the interface.
Consists of member functions defined in php.
Action for the “save” button is directed here.
It contains a form which takes the input from the user to create the profile.
Profile.php
Contains html code to view the details provided by the user.
Consists of member functions defined in php.
Only the required contents from the database are displayed.
cart.php:
Contains html code for the buttons used in the interface.
Consists of member functions defined in php.
It allows the user to view the selected food items and place the order.
checkout.php:
Contains html code for the buttons used in the interface.
Consists of member functions defined in php.
It is a form-based interface where the user has to enter the necessary details to place the
order.
payment.php:
Contains html code for the buttons used in the interface.
It is a radio button interface which allows the user to select the payment mode
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "login";
// Create connection
$conn = mysqli_connect($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
Table 1: User
The User table consists of the main details of the user; it is shown in the diagram below,
User:
Table 2: Menu
The menu table consists of the food items available.
The table is shown below
Menu:
Table 3: Useracc
Useracc table refers to the details of the user.
The table is shown below:
Useracc:
Table 4: CHECKOUT
checkout table consists of the details required for delivery.
It is shown in the diagram below
checkout:
Table 5: ORDER
Table 6: Trigger_time
Trigger_time:
Id exec_time
Code:
DELIMITER $$
CREATE DEFINER=`'root' `@` 'localhost'` PROCEDURE `disp1`()
NO SQL
BEGIN
SELECT * FROM order;
END$$
DELIMITER ;
4.5 Trigger:
Triggers are stored programs, which are automatically executed or fired when some
event occurs. Triggers are written to be executed in response to any of the following events. A
database manipulation (DML) statement (DELETE, INSERT, or UPDATE). A database
definition (DDL) statement (CREATE, ALTER, or DROP).
The trigger named time1 used in this project enters the time at which a user made a new
booking.
The code of trigger is give below
Code :
Chapter 5
SOFTWARE TESTING
Testing is vital to the success of the system. Testing makes a logical assumption that if all the
parts of the system are correct, the goal will be successfully achieved. A small system error
can conceivably explode into a much larger problem. Effective testing early in the process
translates directly into long-term cost savings from a reduced number of errors.
The aim of the testing process is to identify all the defects in the website. It is not practical to
test the website with respect to each value that the input request data may assume. Testing
provides a practical way of reducing defects in the website and increasing the user’s confidence
in a developed system. Testing consists of subjecting the website to a set of test inputs and
observing if the program behaves as expected.
A test case is the triplet [I, S, O] where I am data input to the system. S is the state of t h e
state of the system at which the data is input, O is the expected output of the system A test
suite is the set of all test cases with which a given software product is to be tested. The
following things are associated with testing:
i) Functional Testing
Here the system is a black box whose behavior is determined by studying its inputs and
related outputs. The key problem is to select the inputs that have a huge probability of being
members of a set in many cases.
5.2 Snapshots
Login page: In this page admin can login into the application by giving username and password
Admin page: In this page admin can manage like add,edit or remove menu items.
Conformation page: This page shows the conformed order details of the user.
Chapter 6
CONCLUSION
Inference:
Nowadays, the traditional way of going to a restaurant and eating has reduced considerably. It’s
a new age where technology dominates human life. With the software and technological devices,
exceptions are reduced and even terminated. Also, people prefer easy, quick and safe access to
everything. This project is designed to meet the
requirements of a restaurant.
The Online Food Ordering System provides a simple way to store details of the customer, food
items available and to generate the bill. It is an interface that allows the customer to order the
desired food which he/she can relish within a span of forty-five minutes.
The project is designed is such a way that the user can modify the primary information required
to manage their profile successfully such as the information about the deliver address and
contact number.
Chapter 7
REFERENCES
3. W3Schools
https://www.w3schools.com
4. PhpPoint
https://www.phptpoint.com
5. Stack Overflow
http://stackoverflow.com
https://youtu.be/S-JG1z6Bp3U
https://youtu.be/ueWpNe0PG34
https://youtu.be/oKDqZCkBRZ8
https://youtu.be/O7Wb2rUv_IQ
https://youtu.be/iD_aELaNGIE
https://youtu.be/XxHJzTfWg2Y
https://youtu.be/n7c5zMk8cx4
7. Websites Referred
8. Codeproject
www.codeproject.com
9. Tutorialspoint
www.tutorialspoint.com
10.LucidChart
www.lucidchart.com