KEMBAR78
Lalit Project | PDF | My Sql | Php
0% found this document useful (0 votes)
27 views124 pages

Lalit Project

The document is an industrial training report on a PHP application called 'Daily Expense Tracker' developed by Lalit Kumar for his Master of Computer Application degree. The application aims to help users efficiently manage their daily expenses by allowing them to track income and expenditures, generate reports, and analyze financial data. It includes features such as adding expenses and income, categorizing them, and exporting data, while also discussing the limitations of existing systems and the advantages of the proposed solution.

Uploaded by

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

Lalit Project

The document is an industrial training report on a PHP application called 'Daily Expense Tracker' developed by Lalit Kumar for his Master of Computer Application degree. The application aims to help users efficiently manage their daily expenses by allowing them to track income and expenditures, generate reports, and analyze financial data. It includes features such as adding expenses and income, categorizing them, and exporting data, while also discussing the limitations of existing systems and the advantages of the proposed solution.

Uploaded by

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

INDUSTRIAL TRAINING REPORT

ON
DAILY EXPENSE TRACKER
IN PHP
SUBMITTED FOR THE PARTIAL FULFILLMENT OF THE AWARD OF THE DEGREE OF
MASTER OF COMPUTER APPLICATION

SUBMITTED BY
LALIT KUMAR
(MCA-IVSEM)

DEPARTMENT OF COMPUTER SCIENCE


INSTITUTE OF MANAGEMENT STUDIES
ROORKEE, Uttarakhand (India)

JANUARY-JUNE 2025

Under the supervision of:


Mr. Qamar Alam
(Internal Guide)
Deptt. of Computer Science
IMS, Roorkee
CANDIDATE’S DECLARATION

I hereby declare that the work presented in the report entitled “Daily Expense
Tracker” for the fulfillment of the requirement for the award of the degree of
Master of Computer Application, submitted to the Department of Computer
Science, Institute of Management Studies, Roorkee, is an authentic record of my
work carried out under the guidance of Me. Qamar Alam Department of
Computer Science, Institute of Management Studies, Roorkee.

The matter embodied in this report has not been submitted by me for the award of
any other degree/examination.

Lalit Kumar
MCA IV Semester
IMS,Roorkee

This is to certify that the above statement made by the candidate is correct to the
best of my knowledge.

Internal Guide
Dept. of Computer Science
Institute of Management Studies
Roorkee (India)
INSTITUTE OF MANAGEMENT STUDIES-ROORKEE
(Approved by AICTE, Affiliated to Uttarakhand Technical University, Dehradun)

Campus: 10 Km. Stone, Roorkee-Dehradun Highway, P.B. No.91, Roorkee-247 667


(Uttarakhand)

Website: www.imsroorkee.com Phone: +91-1332 232091,


E-mail: dir@imsroorkee.com Mobile: 9219506900

Dated:

FACULTY CERTIFICATE

This is to certify that Lalit Kumar student of MCA Final Year in our institute
hasprepared this report on Daily Expense Tracker the partial fulfillment
of two years entitled Master of Computer Application.

The minor project has been completed by the student with my entire satisfaction.

Internal Guide External Guide

Mr. Qamar Alam


(Assistant Professor)
Institute of Management Studies-Roorkee
INDEX

Sr. No Contents Page No.


CHAPTER 1
PROJECT DESCRIPTION

1.1 INTRODUCTION
We are developing an php application named as “Expense Tracker” and this application is
used to manage the application user‘s daily expenses in a more efficient and manageable way.
By using this application we can reduce the manual calculations for their daily expenses and
keep the track of the expenditure. In this application, user can provide his income to calculate
his total expenses per day and these results will stored for unique user. This application has
many limitations which can be overcome in future. The main purpose of this application is to
track all the expenses made by a user. The user can generate report of his expenses based on the
transaction date of the expenses or category of items. This application will be deployed on
separate web server and application server. And for load balancing, it will be deployed on two
web servers and application servers. This Expense Tracker application falls in the Finance
Category and serves the important purpose of managing finances which is a very important part
of one’s life. The software product went through the design, development, and the testing phase
as a part of the Software Development Lifecycle. The application’s interface is designed using
custom art elements, the functionality is implemented using php, and the phase of testing the
product was accomplished successfully. The application is not much user intensive but just
comprises of having them enter the expense amount, date, category, merchant and other
optional attributes (taking picture of the receipts, entering notes about the expense, adding
subcategories to the categories). With this entered information, the user is able to see the
expense details daily, weekly, monthly, and yearly in figures, graphs, PDF format, and can print
them as well if a printer is detected or scanned nearby. All these topics have been explained in
detail in their respective chapters. The aim of this is to provide a solution for this application
users on how to manage finances in any circumstance by keeping track of their expenses every
day. Ultimately, this contributes to societal well-being. Expense tracker is complete to track
your all the expenses bared by your pocket or based by you & manage your personal finance. So
that you can trace where your money goes as well as from where money comes in, you can limit
& plan accordingly. A feature rich tracking application with numerous powerful tools like,
Income/Expense, Bills, Accounts, Reports etc. Not only

2|Page
that, app has all the information yet not un-secure as it does not ask to save any sensitive
data for its operations. Budgeting is an integral part of the society. Budget Tracking
involves recording and analyzing the incomes and expenses of a person or an organization
over a particular period of time. Today, since we are living in a hurry up and get it done
society, many people are looking forward to efficient ways to budget their time and money.
During the recent years, some research has been car-ride out on household budget .It has
been noted that in most cases, budget management is being done mentally and never being
put on paper which makes Expense Tracking very difficult. This is probably due to the fact
that many people do not know how to do it or do not have an appropriate means that will do
Expense Tracking and Analia-sis for them. Budgeting also requires us to look ahead and
formalize future goals. By establish a budget, people can set goals for achieving a certain
level of income and monitor their expenses. Many home based and small-business owners
have observed that their increase in profit margins did not occur until they had a written
revenue goal and a method with which to monitor expenses .Expense Tracking is important
because it helps us to keep track of our expenditures based on the incomes made. It also
allows us to plan for future projects and expenditures. Being able to Ana-lyse and compare
income and expenses over a period of time, by calculating monthly/yearly prof-it’s and
expenses as well as deviations, help us to take important decisions. Bankruptcy and future
budgets can also be predicted via the data fed during expense tracking.
1.2 EXISTING SYSTEM:

If we want to balance a income and expense for each month we have to do it manually but we
can’t do this for each and every month those who have a lot of income and expenses, so to reduce the
stress for the person and make easy to calculate the income and expense, this php application has
been so much helpful for a person to avoid the manual way calculating his income and expenses. In
this application we have features like add expenses categories add income so that we can add what
are the income and expenses has been done for a month. But it can used to perform calculation on
income and expenses to overcome this problem we propose the new application.

3|Page
DRAW BACKS:

Experienced manager may attempt to introduce budgetary slack.

The time requirement can be unusually large if there is a participative budgeting process
in place, since such a system involves an unusually large number of employees.


The expense may prescribe that certain amounts of overhead costs be allocated to various
departments.
Time required. It can be very time-consuming to create a budget.

1.3 PROPOSED SYSTEM:

In this php application we are going to develop this by adding some extra features. In
expenses we have some expense feature like add expenses we can add new expense for a month,
add categories , export expenses (it will remain as a specific date how much expense has taken
for a month), remove export files (it will remove the remainder for the month), view expenses
(we can view what are all expense for a month). In income tracker some of the features like add
income, add category, categories, export income, remove export files, and view expenses. In add
income (we can add new income for a month), add categories (we can add new categories for a
month), export income (it will remind us in a date what we have given i.e. from date and to date),
remove export files (it will remove the remainder what we have given to remind). By adding
these features it helps the users to work more efficient and in an effective manner. This
eliminates the drawback of the existing system application.

ADVANTAGES

Add expense (we can add new expense for a month)

Add categories (we can add new categories for a month)

Export income (it will remind us in a date what we have given i.e. from date and to date)

Remove export files (it will remove the remainder what we have given to remind).

4|Page
1.3.1 HARDWARE SPECIFICATION

 Processor : Dual core processor 2.6.0 GHz


 RAM : 1GB
 Hard disk : 160 GB
 Compact Disk : 650 MB
 Keyboard : Standard keyboard
 Monitor : 15 inch color monitor
1.3.2 SOFTWARE SPECIFICATION
 Front End : PHP
 IDE : dream weaver
 Back End : My SQL

1.3.3 PHP

PHP is server side back end programming language. It executes in server along with
maximum all available web servers like Apache, IIS (Internet Information Server) etc.., and
return the response as required MIME type. It is a Pre Process Hypertext, we could do many
things on server by using PHP on server and co-ordinate with DB server for CURD (Create,
Update, Read, and Delete) actions. Front end in the seance, UI which intact the users, it can done
by HTML, or any others. And UI Behavior is defined in UI back end Languages (Scripting
languages) via: Java script, VB script

PHP started out as a small open source project that evolved as more and more people found out
how useful it was. Rasmus Lerdorf unleashed the first version of PHP way back in 1994.

 PHP is a recursive acronym for "PHP: Hypertext Preprocessor".

 PHP is a server side scripting language that is embedded in HTML. It is used to manage
dynamic content, databases, session tracking, even build entire e-commerce sites.

 It is integrated with a number of popular databases, including MySQL, PostgreSQL, Oracle,


Sybase, Informix, and Microsoft SQL Server.

5|Page
 PHP is pleasingly zippy in its execution, especially when compiled as an Apache module on
the UNIX side. The MySQL server, once started, executes even very complex queries with huge
result sets in record-setting time.

 PHP supports a large number of major protocols such as POP3, IMAP, and LDAP. PHP4
added support for Java and distributed object architectures (COM and CORBA), making n-tier
development a possibility for the first time.

 PHP is forgiving: PHP language tries to be as forgiving as possible.

 PHP Syntax is C-Like.

Common Uses of PHP


PHP performs system functions, i.e. from files on a system it can create, open, read, write
and close them. The other uses of PHP are:
PHP can handle forms, i.e. gather data from files, save data to a file, thru email you can send data,
return data to the user. You add, delete and modify elements within your database thru PHP.
Access cookies variables and set cookies. Using PHP, you can restrict users to access some
pages of your website. It can encrypt data.
Characteristics of PHP
Five important characteristics make PHP's practical nature possible:
 Simplicity
 Efficiency
 Security
 Flexibility
 Familiarity
PHP Variables
The main way to store information in the middle of a PHP program is by using a variable.
Here are the most important things to know about variables in PHP.
 All variables in PHP are denoted with a leading dollar sign ($).
 The value of a variable is the value of its most recent assignment.

6|Page
 Variables are assigned with the = operator, with the variable on the left-hand side and the
expression to be evaluated on the right.
 Variables can, but do not need, to be declared before assignment.
 Variables in PHP do not have intrinsic types - a variable does not know in advance
whether it will be used to store a number or a string of characters.
 Variables used before they are assigned have default values.
 PHP does a good job of automatically converting types from one to another when
necessary.
PHP variables are Perl-like. PHP has a total of eight data types which we use to construct our
variables:
 Integers: are whole numbers, without a decimal point, like 4195.
 Doubles: are floating-point numbers, like 3.14159 or 49.1.
 Booleans: have only two possible values either true or false.
 NULL: is a special type that only has one value: NULL.
 Strings: are sequences of characters, like 'PHP supports string operations.'
 Arrays: are named and indexed collections of other values.
 Objects: are instances of programmer-defined classes, which can package up both other
kinds of values and functions that are specific to the class.
 Resources: are special variables that hold references to resources external to PHP (such as
database connections).
Back End (MySQL)
MySQL is the world's most used open source relational database management system
(RDBMS) as of 2008 that run as a server providing multi-user access to a number of databases.
The MySQL development project has made its source code available under the terms of the
GNU General Public License, as well as under a variety of proprietary agreements. MySQL was
owned and sponsored by a single for-profit firm, the Swedish company MySQL AB, now owned
by Oracle Corporation.

MySQL is a popular choice of database for use in web applications, and is a central
component of the widely used LAMP open source web application software stack—LAMP is an

7|Page
acronym for "Linux, Apache, MySQL, Perl/PHP/Python." Free-software-open source projects
that require a full-featured database management system often use MySQL.

For commercial use, several paid editions are available, and offer additional functionality.
Applications which use MySQL databases include: TYPO3, Joomla, Word Press, phpBB, MyBB,
Drupal and other software built on the LAMP software stack. MySQL is also used in many high-
profile, large-scale World Wide Web products, including Wikipedia, Google (though not for
searches), ImagebookTwitter, Flickr, Nokia.com, and YouTube.

Inter images

MySQL is primarily an RDBMS and ships with no GUI tools to administer MySQL
databases or manage data contained within the databases. Users may use the included command
line tools, or use MySQL "front-ends", desktop software and web applications that create and
manage MySQL databases, build database structures, back up data, inspect status, and work with
data records. The official set of MySQL front-end tools, MySQL Workbench is actively
developed by Oracle, and is freely available for use.

Graphical

The official MySQL Workbench is a free integrated environment developed by MySQL


AB, which enables users to graphically administer MySQL databases and visually design
database structures. MySQL Workbench replaces the previous package of software, MySQL
GUI Tools. Similar to other third-party packages, but still considered the authoritative MySQL
frontend, MySQL Workbench lets users manage database design & modeling, SQL development
(replacing MySQL Query Browser) and Database administration (replacing MySQL
Administrator).MySQL Workbench is available in two editions, the regular free and open source
Community Edition which may be downloaded from the MySQL website, and the proprietary
Standard Edition which extends and improves the feature set of the Community Edition.

MySQL ships with some command line tools. Third-parties have also developed tools to
manage a MySQL server, some listed below. Maatkit - a cross-platform toolkit for MySQL,
PostgreSQL and Memcached, developed in Perl Maatkit can be used to prove replication is
8|Page
working correctly, fix corrupted data, automate repetitive tasks, and speed up servers. Maatkit is
included with several GNU/Linux distributions such as CentOS and Debian and packages are
available for Programming. MySQL works on many different system platforms, including AIX,
BSDi, FreeBSD, HP-UX, eComStation, i5/OS, IRIX, Linux, Mac OS X, Microsoft Windows,
NetBSD, Novell NetWare, OpenBSD, OpenSolaris, OS/2 Warp, QNX, Solaris, Symbian, SunOS,
SCO Open Server, SCO UnixWare, Sanos and Tru64. A port of MySQL to OpenVMS also exists.
MySQL is written in C and C++. Its SQL parser is written in yacc, and a home-brewed lexical
analyzer. Many programming languages with language-specific APIs include libraries for accessing
MySQL databases. These include MySQL Connector/Net for integration with Microsoft's Visual
Studio (languages such as C# and VB are most commonly used) and the JDBC driver for Java. In
addition, an ODBC interimage called MyODBC allows additional programming languages that
support the ODBC inter image to communicate with a MySQL database, such as ASP or ColdFusion.
The HTSQL - URL-based query method also ships with a MySQL adapter, allowing direct
interaction between a MySQL database and any web client via structured URLs.

Features

As of April 2009, MySQL offered MySQL 5.1 in two different variants: the open source
MySQL Community Server and the commercial Enterprise Server. MySQL 5.5 is offered under
the same licenses. They have a common code base and include the following features:

A broad subset of ANSI SQL 99, as well as extensions

 Cross-platform support
 Stored procedures
 Triggers
 Cursors
 Updatable Views
 Information schema

Strict mode (ensures MySQL does not truncate or otherwise modify data to conform to an
underlying data type, when an incompatible value is inserted into that type)

9|Page
X/Open XAdistributed transaction processing (DTP) support; two phase commit as part of this,
using Oracle's InnoDB engine

 Transactions with the InnoDB, and Cluster storage engines


 SSL support
 Query caching
 Sub-SELECTs (i.e. nested SELECTs)
 Replication support (i.e. Master-Master Replication & Master-Slave Replication)
 Embedded database library
 Partitioned tables with pruning of partitions in optimizer
 Shared-nothing clustering through MySQL Cluster
 Hot backup (via mysqlhotcopy) under certain conditions

Multiple storage engines, allowing one to choose the one that is most effective for each table in
the application (in MySQL 5.0, storage engines must be compiled in; in MySQL 5.1, storage
engines can be dynamically loaded at run time): Native storage engines (MyISAM, Falcon,
Merge, Memory (heap), Federated, Archive, CSV, Black hole, Cluster, EXAMPLE, Maria, and
InnoDB, which was made the default as of 5.5). Partner-developed storage engines (solidDB,
NitroEDB, ScaleDB, TokuDB, Infobright (formerly Brighthouse), Kickfire, XtraDB, IBM DB2).
InnoDB used to be a partner-developed storage engine, but with recent acquisitions, Oracle now
owns both MySQL core and InnoDB.

10 | P a g e
CHAPTER 2
LOGICAL DEVELOPMENT

2.1. DFDs

A two-dimensional diagram explains how data is processed and transferred in a


system. The graphical depiction identifies each source of data and how it interacts with other
data sources to reach a common output. Individuals seeking to draft a data flow diagram must
identify external inputs and outputs, determine how the inputs and outputs relate to each other,
and explain with graphics how these connections relate and what they result in. This type of
diagram helps business development and design teams visualize how data is processed and
identify or improve certain aspects.

11 | P a g e
Data flow Symbols:

Symbol Description

An entity. A source of data or a destination


for data.

A process or task that is performed by the


system.

A data store, a place where data is held


between processes.

A data flow.

LEVEL 0

DFD Level 0 is also called a Context Diagram. It’s a basic overview of the whole system
or process being analyzed or modeled. It’s designed to be an at-a-glance view, showing the
system as a single high-level process, with its relationship to external entities. It should be easily
understood by a wide audience, including stakeholders, business analysts, data analysts and
developers. A context diagram gives an overview and it is the highest level in a data flow
diagram, containing only one process representing the entire system. It should be split into major
processes which give greater detail and each major process may further split to give more detail.

12 | P a g e
Level 0 DFD must balance with the context diagram it describes. Input going into a process is
different from outputs leaving the process. Data stores are first shown at this level.

User

Expense
Tracking

Database

Fig 2.1.1 level 0-DFD

LEVEL 1

DFD Level 1 provides a more detailed breakout of pieces of the Context Level Diagram.
You will highlight the main functions carried out by the system, as you break down the high-
level process of the Context Diagram into its sub – processes. Level 1 - interaction between 2
different business applications. This is primarily used to explain the process to business and tech
leads, QA leads. As described previously, context diagrams (level 0 DFDs) are diagrams where
the whole system is represented as a single process. A level 1 DFD notates each of the main sub-
processes that together form the complete system. We can think of a level 1 DFD as an
“exploded view” of the context diagram.

13 | P a g e
New
User Database
user

No Yes

Login Register

Add expense

View expense

Compare expenses

Fig 2.1.2 level 1 DFD

2.2 ARCHITECTURAL DESIGN

A system architecture or systems architecture is the conceptual model that defines the
structure, behavior, and more views of a system. An architecture description is a formal
description and representation of a system, organized in a way that supports reasoning about the
structures and behaviors of the system. System architecture can comprise system components,
the externally visible properties of those components, the relationships (e.g. the behavior)
between them. It can provide a plan from which products can be procured, and systems
developed, that will work together to implement the overall system. There have been efforts to
formalize languages to describe system architecture; collectively these are called architecture
description languages (ADLs).

14 | P a g e
EXPENSE TRACKER SYSTEM

USER

Register

Login

Add expense

Expense graph

Fig 2.2 architecture diagram

Various organizations define systems architecture in different ways, including:

 An allocated arrangement of physical elements which provides the design solution for a
consumer product or life-cycle process intended to satisfy the requirements of the
functional architecture and the requirements baseline.
 Architecture comprises the most important, pervasive, top-level, strategic inventions,
decisions, and their associated rationales about the overall structure (i.e., essential
elements and their relationships) and associated characteristics and behavior.
 If documented, it may include information such as a detailed inventory of current hardware,
software and networking capabilities; a description of long-range plans and priorities for
future purchases, and a plan for upgrading and/or replacing dated equipment and software.

15 | P a g e
 An architecture diagram is a graphical representation of a set of concepts that are part of
architecture, including their principles, elements and components. Architecture diagram
can help system designers and developers visualize the high-level, overall structure of
their system or application, in order to ensure the system meets their users' needs. Using
architecture diagram, you can also describe patterns that are used throughout the design.
It's somewhat like a blueprint that you use as a guide, so that you and your colleagues can
discuss, improve and follow.

ASSUMPTIONS

Before developing the application, we have made following assumptions,

1. One user can have only one account.


2. One category can have many items.
3. Each user can define his own category list.
4. When a user opens an Account the first time, the balance will be zero.
5. In current implementation of this project one transaction contains only one item but the
structure that we provide is enabling us to do further extension if we want to apply one
transaction contains many items. For the sake of simplicity and the time constraint we
decided to implement the current condition.
6. User can generate the expense report based on the transaction date or category type.

16 | P a g e
CHAPTER 3

DATABASE DESIGN

After discussing with other groups, we came up with following database schema. We
agreed with the schema of separating items with transaction because we want to keep track of the
items. Our team tried to make specific categorization for specific user so user can name his own
categories, as he likes.

3.1. DATA DICTIONARY

Table structure for table user_category

Field Type Null Default

id int(10) Yes NULL

user varchar(100) Yes NULL

category varchar(100) Yes NULL

17 | P a g e
3.1.1 Table design

Dumping data for table user_category

1 acharyak182@gmail.com Food

2 acharyak182@gmail.com Education

3 acharyak182@gmail.com Transport

4 acharyak182@gmail.com Medical

5 acharyak182@gmail.com Grocery

6 acharyak182@gmail.com entertainment

Table structure for table user_details

Field Type Null Default

id int(100) Yes NULL

name varchar(100) Yes NULL

contact varchar(100) Yes NULL

email varchar(100) Yes NULL

address varchar(100) Yes NULL

password varchar(100) Yes NULL

rdate varchar(100) Yes NULL

18 | P a g e
Dumping data for table user_details

1 Kamal 7339333830 acharyak182@gmail.com trichy 123 01-11-19

Table structure for table user_expense

Field Type Null Default

id int(10) Yes NULL

user varchar(100) Yes NULL

month varchar(100) Yes NULL

cdate varchar(100) Yes NULL

category varchar(100) Yes NULL

amount varchar(100) Yes NULL

status varchar(100) Yes NULL

Dumping data for table user_expense

1 acharyak182@gmail.com 11 01 food 100 0

2 acharyak182@gmail.com 11 01 transport 100 0

19 | P a g e
Table structure for table user_income

Field Type Null Default

id int(10) Yes NULL

user varchar(100) Yes NULL

amount varchar(100) Yes NULL

month varchar(100) Yes NULL

Dumping data for table user_income

1 acharyak182@gmail.com 10000 11

2 acharyak182@gmail.com 5000 10

20 | P a g e
3.3 RELATIONSHIP DIAGRAM

Entity Relationship Diagram, also known as ERD, ER Diagram or ER model, is a type of


structural diagram for use in database design. An ERD contains different symbols and connectors
that visualize two important information: The major entities within the system scope, and the
inter-relationships among these entities. And that's why it's called "Entity" "Relationship"
diagram (ERD)!When we talk about entities in ERD, very often we are referring to business
objects such as people/role (e.g. Student), tangible business objects (e.g. Product), intangible
business objects (e.g. Log), etc. "Relationship" is about how these entities relate to each other
within the system.

Fig 3.3.1ER diagram

21 | P a g e
CHAPTER 4

PROGRAM DESIGN

4.1MODULES

USER
4.1.1 USER MODULE
 Registration: The user has to register into the system providing his personal details. The
user will enter their individual details to be a user in the developed php application. Thus
while registering they can also get the username and password for login session.
 Login: The user has to login into the system to add or view the expenses details, the user
is remembered once he logs in until he logs out saving his time to login every time.
 Add Expenses: The user is allowed to add expenses refer to also adding a picture related
to the details. The user can add picture or leaves empty without adding picture. Thus it
helps the user to describe the event they are posting.
 View Expenses: The user can view the expenses details the user has been selected from
the admin. The expenses details can’t be viewed by everyone which are in public. Thus
the expenses transaction details will be blocked if the user feels uncomfortable.
 Added List: User can also view the list of expenses added by him and action taken by
admin if any. The list can be viewed by the user which they posted in public. If they wish
to delete they can delete it

22 | P a g e
CHAPTER 5
TESTING

5.1 SYSTEM TESTING

System Testing is the testing of a complete and fully integrated software product. Usually,
software is only one element of a larger computer-based system. Ultimately, software is
interfaced with other software/hardware systems. System Testing is actually a series of different
tests whose sole purpose is to exercise the full computer-based system.

Two Category of System Testing

 Black Box Testing


 White Box Testing

System test falls under the black box testing category of software testing.


White box testing is the testing of the internal workings or code of a software application.
In contrast,


Black box or System Testing is the opposite. System test involves the external workings
of the software from the user's perspective.

System Testing involves testing the software code for following


Testing the fully integrated applications including external peripherals in order to check
how components interact with one another and with the system as a whole. This is also
called End to End testing scenario.

Verify thorough testing of every input in the application to check for desired outputs.

Testing of the user's experience with the application. That is a very basic description of
what is involved in system testing. You need to build detailed test cases and test suites
that test each aspect of the application as seen from the outside without looking at the
actual source code.

23 | P a g e
These are the steps taken to fully test new software in preparation for marketing it:

 Unit testing - testing performed on each module or block of code during development.
Unit Testing is normally done by the programmer who writes the code.
 Integration testing - testing done before, during and after integration of a new module into
the main software package. This involves testing of each individual code module. One piece
of software can contain several modules which are often created by several different
programmers. It is crucial to test each module's effect on the entire program model.
 System testing - testing done by a professional testing agent on the completed software
product before it is introduced to the market.
 Acceptance testing - beta testing of the product done by the actual end users.

24 | P a g e
CHAPTER 6
CONCLUSION
We now present and discuss the limitations of the new product, issues faced, and the
remedies to those limitations. While building this expense tracking software project, the major focus
was to make this tool less user intensive and more user productive. It could have been used in other
countries if I would have used currency converters in the php application, which I will improvise in
the later version. Certain issues were faced while implementing this tool and various important things
were kept in mind. For example, the user interface is designed simple yet creative so that the user
doesn’t face any difficulty in using the php software application and the expense data is persisted on
the device even if the user deletes the application from the memory background. Core Data was
chosen over SQLite to persist the data which is very beneficial even though the data would reside on
the device locally the application is designed in such a simple and straight forward manner that the
user faces no problems or difficulties in using this software tool to track the expenses. The user can
only enter the expense/income amount in Currency. The application could have been more user
friendly. For example – if the user keeps track of the daily expenses and spends money at Starbucks
every day, he has to enter all the information amount etc. himself all over again. Searching
functionality is missing in the current version of the application. Suppose the user wants to search
and see the expenses made for a particular category say “Food - Starbucks” for the past 3 months, the
user has to scroll through the calendar provided and see it. The reports in terms of graphs show a
comparison of the expenses/incomes separately made on different categories. But the graph report
doesn’t show or evaluate income made v/s expense.

25 | P a g e
CHAPTER 7

REFERENCES

1. Acharya, Kamal, Attendance Management System Project (April 28, 2024).


Available at
SSRN: https://ssrn.com/abstract=4810251 or http://dx.doi.org/10.2139/ssrn.4810251
2. Acharya, Kamal, Online Food Order System (May 2, 2024). Available at
SSRN: https://ssrn.com/abstract=4814732 or http://dx.doi.org/10.2139/ssrn.4814732
3. Acharya, Kamal, University management system project. (May 1, 2024). Available at
SSRN: https://ssrn.com/abstract=4814103 or http://dx.doi.org/10.2139/ssrn.4814103
4. Acharya, Kamal, Online banking management system. (May 1, 2024). Available at SSRN:
https://ssrn.com/abstract=4813597 or http://dx.doi.org/10.2139/ssrn.4813597
5. Acharya, Kamal, Online Job Portal Management System (May 5, 2024). Available at
SSRN: https://ssrn.com/abstract=4817534 or http://dx.doi.org/10.2139/ssrn.4817534
6. Acharya, Kamal, Employee leave management system. (May 7, 2024). Available
at SSRN: https://ssrn.com/abstract=4819626 or http://dx.doi.org/10.2139/ssrn.4819626
7. Acharya, Kamal, Online electricity billing project report. (May 7, 2024). Available at
SSRN: https://ssrn.com/abstract=4819630 or http://dx.doi.org/10.2139/ssrn.4819630
8. Acharya, Kamal, POLICY MANAGEMENT SYSTEM PROJECT REPORT. (December
10, 2023). Available at
SSRN: https://ssrn.com/abstract=4831694 or http://dx.doi.org/10.2139/ssrn.4831694
9. Acharya, Kamal, Online job placement system project report. (January 10, 2023).
Available at
SSRN: https://ssrn.com/abstract=4831638 or http://dx.doi.org/10.2139/ssrn.4831638
10. Acharya, Kamal, Software testing for project report. (May 16, 2023). Available at SSRN:
https://ssrn.com/abstract=4831028 or http://dx.doi.org/10.2139/ssrn.4831028
11. Acharya, Kamal, ONLINE CRIME REPORTING SYSTEM PROJECT. (August 10, 2022).
Available at
SSRN: https://ssrn.com/abstract=4831015 or http://dx.doi.org/10.2139/ssrn.4831015
12. Acharya, Kamal, Burger ordering system project report. (October 10, 2022). Available
at SSRN: https://ssrn.com/abstract=4832704 or http://dx.doi.org/10.2139/ssrn.4832704
13. Acharya, Kamal, Teachers Record Management System Project Report (December 10,
2023). Available at
SSRN: https://ssrn.com/abstract=4833821 or http://dx.doi.org/10.2139/ssrn.4833821
14. Acharya, Kamal, Dairy Management System Project Report (December 20, 2020).
Available at
SSRN: https://ssrn.com/abstract=4835231 or http://dx.doi.org/10.2139/ssrn.4835231

26 | P a g e
15. Acharya, Kamal, Electrical Shop Management System Project (December 10, 2019).
Available at
SSRN: https://ssrn.com/abstract=4835238 or http://dx.doi.org/10.2139/ssrn.4835238
16. Acharya, Kamal, Online book store management system project report. (Febuary 10,
2020). Available at
SSRN: https://ssrn.com/abstract=4835277 or http://dx.doi.org/10.2139/ssrn.4835277
17. Acharya, Kamal, Paint shop management system project report. (January 10, 2019).
Available at
SSRN: https://ssrn.com/abstract=4835441 or http://dx.doi.org/10.2139/ssrn.4835441
18. Acharya, Kamal, Supermarket billing system project report. (August 10, 2021). Available at
SSRN: https://ssrn.com/abstract=4835474 or http://dx.doi.org/10.2139/ssrn.4835474
19. Acharya, Kamal, Online taxi booking system project report. (March 10, 2022). Available
at SSRN: https://ssrn.com/abstract=4837729 or http://dx.doi.org/10.2139/ssrn.4837729
20. Acharya, Kamal, Online car servicing system project report. (March 10, 2023). Available at
SSRN: https://ssrn.com/abstract=4837832 or http://dx.doi.org/10.2139/ssrn.4837832
21. Acharya, Kamal, School management system project report. (July 10, 2021). Available at
SSRN: https://ssrn.com/abstract=4837837 or http://dx.doi.org/10.2139/ssrn.4837837
22. Acharya, Kamal, Furniture Showroom Management System Project Report (March 21,
2021). Available at
SSRN: https://ssrn.com/abstract=4839422 or http://dx.doi.org/10.2139/ssrn.4839422
23. Acharya, Kamal, Online Vehicle Rental System Project Report (March 21, 2019).
Available at
SSRN: https://ssrn.com/abstract=4839429 or http://dx.doi.org/10.2139/ssrn.4839429
24. Acharya, Kamal, Fruit Shop Management System Project Report (August 10, 2023).
Available at
SSRN: https://ssrn.com/abstract=4841048 or http://dx.doi.org/10.2139/ssrn.4841048
25. Acharya, Kamal, Hall Booking Management System Project Report (December 21,
2023). Available at
SSRN: https://ssrn.com/abstract=4841055 or http://dx.doi.org/10.2139/ssrn.4841055
26. Acharya, Kamal, Lundry Management System Project Report (October 21, 2023).
Available at
SSRN: https://ssrn.com/abstract=4841059 or http://dx.doi.org/10.2139/ssrn.4841059
27. Acharya, Kamal, A CASE STUDY OF CINEMA MANAGEMENT SYSTEM PROJECT
(September 25, 2023). Available at
SSRN: https://ssrn.com/abstract=4841209 or http://dx.doi.org/10.2139/ssrn.4841209
28. Acharya, Kamal, A CASE STUDY ON ONLINE TICKET BOOKING SYSTEM
PROJECT (May 25, 2024). Available at
SSRN: https://ssrn.com/abstract=4841210 or http://dx.doi.org/10.2139/ssrn.4841210
29. Acharya, Kamal, ONLINE DATING MANAGEMENT SYSTEM PROJECT REPORT.
(April 25, 2023). Available at
SSRN: https://ssrn.com/abstract=4842066 or http://dx.doi.org/10.2139/ssrn.4842066

27 | P a g e
30. Acharya, Kamal, ONLINE RESUME BUILDER MANAGEMENT SYSTEM PROJECT
REPORT. (April 25, 2021). Available at
SSRN: https://ssrn.com/abstract=4842071 or http://dx.doi.org/10.2139/ssrn.4842071
31. Acharya, Kamal, TOLL TEX MANAGEMENT SYSTEM PROJECT REPORT (August 21,
2023). Available at
SSRN: https://ssrn.com/abstract=4842082 or http://dx.doi.org/10.2139/ssrn.4842082
32. Acharya, Kamal, Chat Application Through Client Server Management System
Project Report (June 25, 2023). Available at
SSRN: https://ssrn.com/abstract=4842761 or http://dx.doi.org/10.2139/ssrn.4842761
33. Acharya, Kamal, Web Chatting Application Management System Project Report
(April 25, 2022). Available at
SSRN: https://ssrn.com/abstract=4842771 or http://dx.doi.org/10.2139/ssrn.4842771
34. Acharya, Kamal, Automobile management system project report (May 25, 2022).
Available at
SSRN: https://ssrn.com/abstract=4846917 or http://dx.doi.org/10.2139/ssrn.4846917
35. Acharya, Kamal, College bus management system project report (April 25, 2023).
Available at
SSRN: https://ssrn.com/abstract=4846920 or http://dx.doi.org/10.2139/ssrn.4846920
36. Acharya, Kamal, Courier management system project report (May 25, 2023). Available at
SSRN: https://ssrn.com/abstract=4846922 or http://dx.doi.org/10.2139/ssrn.4846922
37. Acharya, Kamal, Event management system project report (April 25, 2021). Available
at SSRN: https://ssrn.com/abstract=4846927 or http://dx.doi.org/10.2139/ssrn.4846927
38. Acharya, Kamal, Library management system project report II (May 25, 2020). Available
at SSRN: https://ssrn.com/abstract=4848857 or http://dx.doi.org/10.2139/ssrn.4848857
39. Kamal Acharya. Teacher record management system project report. Authorea. August 02,
2024.
DOI: https://doi.org/10.22541/au.172261514.46787329/v1
40. KamalAcharya. POSTOFFICEMANAGEMENTSYSTEMPROJECT

41. Kamal Acharya. Fruit shop management system project report. Authorea. August 02,
2024.
DOI: https://doi.org/10.22541/au.172261514.42227675/v1
42. Kamal Acharya. Dairy management system project report. Authorea. August 02, 2024.
DOI: https://doi.org/10.22541/au.172261513.39402347/v1
43. Kamal Acharya. DATA COMMUNICATION AND COMPUTER NETWORK
MANAGEMENT SYSTEM PROJECT REPORT. Authorea. August 01, 2024.
DOI: https://doi.org/10.22541/au.172254873.37480177/v1
44. Kamal Acharya. School management system project report. Authorea. August 01, 2024.
DOI: https://doi.org/10.22541/au.172254873.34023165/v1
45. Kamal Acharya. A CASE STUDY OF CINEMA MANAGEMENT SYSTEM PROJECT.
Authorea. August 01, 2024.
DOI: https://doi.org/10.22541/au.172254873.30191075/v1

28 | P a g e
46. Kamal Acharya. A CASE STUDY ON ONLINE TICKET BOOKING SYSTEM PROJECT.
Authorea. August 01, 2024
DOI: https://doi.org/10.22541/au.172254872.26972790/v1
47. Kamal Acharya. Web chatting application project report management
system. Authorea. August 01, 2024.
DOI: https://doi.org/10.22541/au.172254871.18588592/v1
48. Kamal Acharya. RETAIL STORE MANAGEMENT SYSTEM PROJECT
REPORT. Authorea. August 01, 2024.
DOI: https://doi.org/10.22541/au.172254871.14590154/v1
49. Kamal Acharya. SUPERMARKET MANAGEMENT SYSTEM PROJECT
REPORT. Authorea. August 01, 2024.
DOI: https://doi.org/10.22541/au.172252491.19145062/v1
50. Kamal Acharya. SOCIAL MEDIA MANAGEMENT SYSTEM PROJECT

51. Kamal Acharya. Online music portal management system project report. Authorea.
August 01, 2024.
DOI: https://doi.org/10.22541/au.172252488.89734698/v1
52. Kamal Acharya. COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.
Authorea. July 31, 2024.
DOI: https://doi.org/10.22541/au.172245277.70798942/v1
53. Kamal Acharya. AUTOMOBILE MANAGEMENT SYSTEM PROJECT REPORT.
Authorea. July 31, 2024.
DOI: https://doi.org/10.22541/au.172245276.67982593/v1
54. Kamal Acharya. Ludo management system project report. Authorea. July 31,
2024 DOI: https://doi.org/10.22541/au.172243999.98091616/v1
55. Kamal Acharya. Literature online quiz system project report. Authorea. July 31,
2024
DOI: https://doi.org/10.22541/au.172243825.53562953/v1
56. Kamal Acharya. Avoid waste management system project. Authorea. July 29, 2024
DOI: https://doi.org/10.22541/au.172228528.85022205/v1
57. Kamal Acharya. CHAT APPLICATION THROUGH CLIENT SERVER MANAGEMENT
SYSTEM PROJECT. Authorea. July 29, 2024.
DOI: https://doi.org/10.22541/au.172228527.74316529/v1
58. Kamal Acharya. Parking allotment system project report. Authorea. July 29, 2024.
DOI: https://doi.org/10.22541/au.172227078.89966943/v1
59. Kamal Acharya. HEALTH INSURANCE CLAIM MANAGEMENT
SYSTEM. Authorea. July 26, 2024.
DOI: https://doi.org/10.22541/au.172202020.06707762/v1
60. Kamal Acharya. ONLINE TRAIN BOOKING SYSTEM PROJECT

61. Kamal Acharya. COVID MANAGEMENT SYSTEM PROJECT REPORT. Authorea. July
16, 2024.
DOI: https://doi.org/10.22541/au.172116616.60220024/v1

29 | P a g e
62. Kamal Acharya. COVID MANAGEMENT SYSTEM PROJECT REPORT. Authorea. July
16, 2024.
DOI: https://doi.org/10.22541/au.172116616.60220024/v1

30 | P a g e
CHAPTER 8

APPENDIX

8.1 SOURCE CODE

<?php
$connect=mysql_connect("localhost","root","");
mysql_select_db("expense_tracker",$connect);
?>
<?php
include("dbconnect.php");
session_start();
extract($_POST);
if(isset($_POST['btn']))
{
echo $qry=mysql_query("select * from user_details where email='$email' and password='$pass'");
$num=mysql_num_rows($qry);
if($num==1)
{
$_SESSION['email']=$email;
?>
<script language="javascript">
alert("Login Successfully");
window.location.href="user_home.php";
</script>
<?php
}
else
{
?>
<script language="javascript">
alert("Failed");
window.location.href="index.php";

31 | P a g e
</script>
<?php
}

}
?>
<!DOCTYPE HTML>
<html>
<head>
<title>Easy Admin Panel an Admin Panel Category Flat Bootstrap Responsive Website Template | Sign
In :: w3layouts</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="Easy Admin Panel Responsive web template, Bootstrap Web
Templates, Flat Web Templates, Android Compatible web template,
Smartphone Compatible web template, free webdesigns for Nokia, Samsung, LG, SonyEricsson,
Motorola web design" />
<script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar,
0); }, false); function hideURLbar(){ window.scrollTo(0,1); } </script> <!-- Bootstrap Core CSS -->

<link href="css/bootstrap.min.css" rel='stylesheet' type='text/css'


/> <!-- Custom CSS -->
<link href="css/style.css" rel='stylesheet' type='text/css'
/> <!-- Graph CSS -->
<link href="css/font-awesome.css" rel="stylesheet">
<!-- jQuery -->
<!-- lined-icons -->
<link rel="stylesheet" href="css/icon-font.min.css" type='text/css' />
<!-- //lined-icons -->
<!-- chart -->
<script src="js/Chart.js"></script>
<!-- //chart -->
<!--animate-->
<link href="css/animate.css" rel="stylesheet" type="text/css" media="all">

32 | P a g e
<script src="js/wow.min.js"></script>
<script>
new WOW().init();
</script>
<!--//end-animate-->
<!----webfonts--->
<link
href='//fonts.googleapis.com/css?family=Cabin:400,400italic,500,500italic,600,600italic,700,700italic'
rel='stylesheet' type='text/css'>
<!---//webfonts--->
<!-- Meters graphs -->
<script src="js/jquery-1.10.2.min.js"></script>
<!-- Placed js at the end of the document so the pages load faster -->

</head>

<body class="sign-in-up">
<section>
<div id="page-wrapper" class="sign-in-wrapper">
<div class="graphs">
<div class="sign-in-form">
<div class="sign-in-form-top">
<p><a href="index.php">Sign In</a></p>
</div>
<div class="signin">
<div class="signin-rit">

</div>
<form name="form1" method="post" action="">
<div class="log-input">

<div class="log-input-center">
<input type="text" class="user"
Placeholder="Email Id" required="" name="email" />

33 | P a g e
</div>

</div>
<div class="log-input">
<div class="log-input-center">
<input type="password" class="lock"
Placeholder="password" required="" name="pass"/>
</div>

</div>
<input type="submit" name="btn" value="Login
to your account">
</form>
</div>
<div class="new_people">
<h4>For New People <a
href="user_register.php">Register Now!</a> </h4>
</div>
</div>
</div>
</div>
<!--footer section start-->

<!--footer section end-->


</section>

<script src="js/jquery.nicescroll.js"></script>
<script src="js/scripts.js"></script>
<!-- Bootstrap Core JavaScript -->
<script src="js/bootstrap.min.js"></script>
</body>
</html>
<?php
include("dbconnect.php");

34 | P a g e
session_start();
extract($_POST);

$e=$_SESSION['email'];
$xyz=mysql_query("select * from user_category where user='$e'");

if(isset($_POST['btn']))
{
$max_qry = mysql_query("select max(id) from user_category");
$max_row = mysql_fetch_array($max_qry);
$id=$max_row['max(id)']+1;
echo $qry=mysql_query("insert into user_category values('$id','$e','$textfield')");
if($qry)
{
?>
<script language="javascript">
alert("Success");
window.location.href="user_category.php";

</script>
<?php
}
else
{
?>
<script language="javascript">
alert("Failed");
window.location.href="user_category.php";

</script>
<?php
}

35 | P a g e
?>
<!DOCTYPE HTML>
<html>
<head>
<title>Easy Admin Panel an Admin Panel Category Flat Bootstrap Responsive Website Template | Short
Codes :: w3layouts</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="Easy Admin Panel Responsive web template, Bootstrap Web
Templates, Flat Web Templates, Android Compatible web template,
Smartphone Compatible web template, free webdesigns for Nokia, Samsung, LG, SonyEricsson,
Motorola web design" />
<script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar,
0); }, false); function hideURLbar(){ window.scrollTo(0,1); } </script> <!-- Bootstrap Core CSS -->

<link href="css/bootstrap.min.css" rel='stylesheet' type='text/css'


/> <!-- Custom CSS -->
<link href="css/style.css" rel='stylesheet' type='text/css'
/> <!-- Graph CSS -->
<link href="css/font-awesome.css" rel="stylesheet">
<!-- jQuery -->
<!-- lined-icons -->
<link rel="stylesheet" href="css/icon-font.min.css" type='text/css' />
<!-- //lined-icons -->
<!-- chart -->
<script src="js/Chart.js"></script>
<!-- //chart -->
<!--animate-->
<link href="css/animate.css" rel="stylesheet" type="text/css"
media="all"> <script src="js/wow.min.js"></script>
<script>
new WOW().init();
</script>
<!--//end-animate-->

36 | P a g e
<!----webfonts--->
<link
href='//fonts.googleapis.com/css?family=Cabin:400,400italic,500,500italic,600,600italic,700,700italic'
rel='stylesheet' type='text/css'>
<!---//webfonts--->
<!-- Meters graphs -->s
<script src="js/jquery-1.10.2.min.js"></script>
<!-- Placed js at the end of the document so the pages load faster -->

</head>

<body class="sticky-header left-side-collapsed" onload="initMap()">


<section>
<!-- left side start-->
<div class="left-side sticky-left-side">

<!--logo and iconic logo start-->


<div class="logo">
<h1><a href="index.html">Easy <span>Admin</span></a></h1>
</div>
<div class="logo-icon text-center">
<a href="index.html"><i class="lnr lnr-home"></i> </a>
</div>

<!--logo and iconic logo end-->


<div class="left-side-inner">

<!--sidebar nav start-->


<ul class="nav nav-pills nav-stacked custom-nav">
<li><a href="user_home.php"><i class="lnr lnr-
select"></i><span>Home</span></a></li>
<li class="active"><a href="user_category.php"><i
class="lnr lnr-cog"></i> <span>Category</span></a></li>

37 | P a g e
<li><a href="user_income.php"><i class="lnr lnr-
pencil"></i> <span>Income</span></a></li>
<li><a href="user_expense.php"><i class="lnr lnr-
indent-increase"></i> <span>Expense</span></a></li>
<li><a href="user_view.php"><i class="lnr lnr-
eye"></i> <span>View</span></a></li>
<li><a href="user_report.php"><i class="lnr lnr-
book"></i> <span>Report</span></a></li>
<li><a href="index.php"><i class="lnr lnr-power-
switch"></i> <span>Logout</span></a></li>
</ul>
<!--sidebar nav end-->
</div>
</div>
<!-- left side end-->

<!-- main content start-->


<div class="main-content">
<!-- header-starts -->
<div class="header-section">

<!--toggle button start-->


<a class="toggle-btn menu-collapsed"><i class="fa fa-bars"></i></a>
<!--toggle button end-->

<!--notification menu start -->


<div class="menu-right">
<div class="user-panel-top">
<div class="profile_details">
<ul>
<li class="dropdown profile_details_drop">
<a href="#" class="dropdown-toggle"
data-toggle="dropdown" aria-expanded="false">
<div class="profile_img">

38 | P a g e
<span
style="background:url(images/user1.png) no-repeat center"> </span>
<div class="user-
name">
<p><?php echo
$e;?><span>user</span></p>
</div>
<i class="lnr lnr-
chevron-down"></i>
<i class="lnr lnr-
chevron-up"></i>
<div
class="clearfix"></div>
</div>
</a>
<ul class="dropdown-menu drp-mnu">

<li> <a href="index.php"><i


class="fa fa-sign-out"></i> Logout</a> </li>
</ul>
</li>
<div class="clearfix"> </div>
</ul>
</div>

</div>
</div>
<!--notification menu end -->
</div>
<!-- //header-ends -->
<div id="page-wrapper">
<div class="graphs">
<h3 class="blank1">Expense Category</h3>

39 | P a g e
<div class="grid_3 grid_4">
<div class="bs-example ">
<table class="table" >
<tbody>
<tr>
<td><h1 id="h1">&nbsp;</h1></td>
<td class="type-info"><div align="center">
<h1>ADD NEW CATEGORY </h1>
</div></td>
<td class="type-info">&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td class="type-info"><form name="form1"
method="post" action="">
<table width="200" border="0"
align="center">
<tr>
<td>Category</td>
<td><label>
<input type="text" name="textfield">
</label></td>
</tr>
<tr>
<td>&nbsp;</td>
<td><label>
<input name="btn" type="submit" id="btn"
value="Submit"> <br>
</label></td>
</tr>
</table>
</form> </td>
<td class="type-info">&nbsp;</td>
</tr>

40 | P a g e
<tr>
<td>&nbsp;</td>
<td class="type-info"><table class="table">
<thead>
<tr>
<th>#</th>
<th>Keywords</th>
</tr>
</thead>
<tbody>
<?php
$a=1;
while($row=mysql_fetch_array($xyz))
{

$b=$a%2;
if($b==0)
{
?>
<tr class="info">
<?php

}
?>
<th scope="row"><?php echo $a; ?></th>
<td><?php echo $row['category'];?></td>
</tr>
<?php
$a++;
}
?>
</tbody>
</table></td>
<td class="type-info">&nbsp;</td>

41 | P a g e
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<!--footer section start-->
<footer>
<p>&copy 2019 Easy Admin Panel. All RightsReserved | Design by
Admin.</a></p>
</footer>
<!--footer section end-->
</section>

<script src="js/jquery.nicescroll.js"></script>
<script src="js/scripts.js"></script>
<!-- Bootstrap Core JavaScript -->
<script src="js/bootstrap.min.js"></script>
</body>
</html>
<?php
include("dbconnect.php");
session_start();
extract($_POST);

$e=$_SESSION['email'];
$dd =date("d");

$xyz=mysql_query("select * from user_category where user='$e'");


if(isset($_POST['btn']))
{
$max_qry = mysql_query("select max(id) from user_expense");

42 | P a g e
$max_row = mysql_fetch_array($max_qry);
$id=$max_row['max(id)']+1;
echo $qry=mysql_query("insert into user_expense values('$id','$e','$mo','$dd','$select','$amt','0')");
if($qry)
{
?>
<script language="javascript">
alert("Success");
window.location.href="user_expense.php";

</script>
<?php
}
else
{
?>
<script language="javascript">
alert("Failed");
window.location.href="user_expense.php";

</script>
<?php
}

}
?>
<!DOCTYPE HTML>
<html>
<head>
<title>Easy Admin Panel an Admin Panel Category Flat Bootstrap Responsive Website Template | Short
Codes :: w3layouts</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

43 | P a g e
<meta name="keywords" content="Easy Admin Panel Responsive web template, Bootstrap Web
Templates, Flat Web Templates, Android Compatible web template,
Smartphone Compatible web template, free webdesigns for Nokia, Samsung, LG, SonyEricsson,
Motorola web design" />
<script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar,
0); }, false); function hideURLbar(){ window.scrollTo(0,1); } </script> <!-- Bootstrap Core CSS -->

<link href="css/bootstrap.min.css" rel='stylesheet' type='text/css'


/> <!-- Custom CSS -->
<link href="css/style.css" rel='stylesheet' type='text/css'
/> <!-- Graph CSS -->
<link href="css/font-awesome.css" rel="stylesheet">
<!-- jQuery -->
<!-- lined-icons -->
<link rel="stylesheet" href="css/icon-font.min.css" type='text/css' />
<!-- //lined-icons -->
<!-- chart -->
<script src="js/Chart.js"></script>
<!-- //chart -->
<!--animate-->
<link href="css/animate.css" rel="stylesheet" type="text/css"
media="all"> <script src="js/wow.min.js"></script>
<script>
new WOW().init();
</script>
<!--//end-animate-->
<!----webfonts--->
<link
href='//fonts.googleapis.com/css?family=Cabin:400,400italic,500,500italic,600,600italic,700,700italic'
rel='stylesheet' type='text/css'>
<!---//webfonts--->
<!-- Meters graphs -->
<script src="js/jquery-1.10.2.min.js"></script>
<!-- Placed js at the end of the document so the pages load faster -->

44 | P a g e
</head>

<body class="sticky-header left-side-collapsed" onload="initMap()">


<section>
<!-- left side start-->
<div class="left-side sticky-left-side">

<!--logo and iconic logo start-->


<div class="logo">
<h1><a href="index.html">Easy <span>Admin</span></a></h1>
</div>
<div class="logo-icon text-center">
<a href="index.html"><i class="lnr lnr-home"></i> </a>
</div>

<!--logo and iconic logo end-->


<div class="left-side-inner">

<!--sidebar nav start-->


<ul class="nav nav-pills nav-stacked custom-nav">
<li><a href="user_home.php"><i class="lnr lnr-
select"></i><span>Home</span></a></li>
<li ><a href="user_category.php"><i class="lnr lnr-
cog"></i> <span>Category</span></a></li>
<li ><a href="user_income.php"><i class="lnr lnr-
pencil"></i> <span>Income</span></a></li>
<li class="active"><a href="user_expense.php"><i
class="lnr lnr-indent-increase"></i> <span>Expense</span></a></li>
<li><a href="user_view.php"><i class="lnr lnr-
eye"></i> <span>View</span></a></li>
<li><a href="user_report.php"><i class="lnr lnr-
book"></i> <span>Report</span></a></li>

45 | P a g e
<li><a href="index.php"><i class="lnr lnr-power-
switch"></i> <span>Logout</span></a></li>
</ul>
<!--sidebar nav end-->
</div>
</div>
<!-- left side end-->

<!-- main content start-->


<div class="main-content">
<!-- header-starts -->
<div class="header-section">

<!--toggle button start-->


<a class="toggle-btn menu-collapsed"><i class="fa fa-bars"></i></a>
<!--toggle button end-->

<!--notification menu start -->


<div class="menu-right">
<div class="user-panel-top">
<div class="profile_details">
<ul>
<li class="dropdown profile_details_drop">
<a href="#" class="dropdown-toggle"
data-toggle="dropdown" aria-expanded="false">
<div class="profile_img">
<span
style="background:url(images/user1.png) no-repeat center"> </span>
<div class="user-
name">
<p><?php echo
$e;?><span>user</span></p>
</div>

46 | P a g e
<i class="lnr lnr-
chevron-down"></i>
<i class="lnr lnr-
chevron-up"></i>
<div
class="clearfix"></div>
</div>
</a>
<ul class="dropdown-menu drp-mnu">

<li> <a href="index.php"><i


class="fa fa-sign-out"></i> Logout</a> </li>
</ul>
</li>
<div class="clearfix"> </div>
</ul>
</div>

</div>
</div>
<!--notification menu end -->
</div>
<!-- //header-ends -->
<div id="page-wrapper">
<div class="graphs">
<h3 class="blank1">USER EXPENSE DETAILS </h3>
<div class="grid_3 grid_4">
<div class="bs-example ">
<table class="table" >
<tbody>
<tr>
<td><h1 id="h1">&nbsp;</h1></td>
<td class="type-info"><div align="center">

47 | P a g e
<h1>ADD EXPENSE </h1>
</div></td>
<td class="type-info">&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td class="type-info"><form name="form1"
method="post" action="">
<table width="200" border="0"
align="center">
<tr>
<td>Month</td>
<td><label>
<input name="mo" type="text" id="mo" value="<?php echo $date =date("m"); ?>"
>
</label></td>
</tr>
<tr>
<td>Category</td>
<td><label>
<select name="select">
<?php

while($row=mysql_fetch_array($xyz))
{
?>
<option value="<?php echo $row['category'];?>"><?php echo
$row['category'];?></option>
<?php

}
?>
</select>

48 | P a g e
</label></td>
</tr>
<tr>
<td>Amount</td>
<td><label>
<input type="number" name="amt" required=""
placeholder="Amount"> </label></td>
</tr>
<tr>
<td>&nbsp;</td>
<td><label>
<input name="btn" type="submit" id="btn"
value="Submit"> <br>
</label></td>
</tr>
</table>
</form> </td>
<td class="type-info">&nbsp;</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<!--footer section start-->
<footer>
<p>&copy 2019 Easy Admin Panel. All RightsReserved | Design by
Admin.</a></p>
</footer>
<!--footer section end-->
</section>

49 | P a g e
<script src="js/jquery.nicescroll.js"></script>
<script src="js/scripts.js"></script>
<!-- Bootstrap Core JavaScript -->
<script src="js/bootstrap.min.js"></script>
</body>
</html>
<?php
include("dbconnect.php");
session_start();
extract($_POST);

$e=$_SESSION['email'];
$xyz=mysql_query("select * from user_expense where user='$e'");

$total=0;
$income=0;
$xyz1=mysql_query("select * from user_income where user='$e'");
while($row1=mysql_fetch_array($xyz1))
{
$income=$income+$row1['amount'];
}
while($row=mysql_fetch_array($xyz))
{
$total= $total+$row['amount'];
}
?>
<!DOCTYPE HTML>
<html>
<head>
<title>Easy Admin Panel an Admin Panel Category Flat Bootstrap Responsive Website Template |
Home :: w3layouts</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

50 | P a g e
<meta name="keywords" content="Easy Admin Panel Responsive web template, Bootstrap Web
Templates, Flat Web Templates, Android Compatible web template,
Smartphone Compatible web template, free webdesigns for Nokia, Samsung, LG, SonyEricsson,
Motorola web design" />
<script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar,
0); }, false); function hideURLbar(){ window.scrollTo(0,1); } </script> <!-- Bootstrap Core CSS -->

<link href="css/bootstrap.min.css" rel='stylesheet' type='text/css'


/> <!-- Custom CSS -->
<link href="css/style.css" rel='stylesheet' type='text/css'
/> <!-- Graph CSS -->
<link href="css/font-awesome.css" rel="stylesheet">
<!-- jQuery -->
<!-- lined-icons -->
<link rel="stylesheet" href="css/icon-font.min.css" type='text/css' />
<!-- //lined-icons -->
<!-- chart -->
<script src="js/Chart.js"></script>
<!-- //chart -->
<!--animate-->
<link href="css/animate.css" rel="stylesheet" type="text/css"
media="all"> <script src="js/wow.min.js"></script>
<script>
new WOW().init();
</script>
<!--//end-animate-->
<!----webfonts--->
<link
href='//fonts.googleapis.com/css?family=Cabin:400,400italic,500,500italic,600,600italic,700,700italic'
rel='stylesheet' type='text/css'>
<!---//webfonts--->
<!-- Meters graphs -->
<script src="js/jquery-1.10.2.min.js"></script>
<!-- Placed js at the end of the document so the pages load faster -->

51 | P a g e
</head>

<body class="sticky-header left-side-collapsed" onload="initMap()">


<section>
<!-- left side start-->
<div class="left-side sticky-left-side">

<!--logo and iconic logo start-->


<div class="logo">
<h1><a href="user_home.php">Expense
<span>Tracker</span></a></h1>
</div>
<div class="logo-icon text-center">
<a href="user_home.php"><i class="lnr lnr-home"></i> </a>
</div>

<!--logo and iconic logo end-->


<div class="left-side-inner">

<!--sidebar nav start-->


<ul class="nav nav-pills nav-stacked custom-nav">
<li class="active"><a href="user_home.php"><i
class="lnr lnr-select"></i><span>Home</span></a></li>
<li><a href="user_category.php"><i class="lnr lnr-
cog"></i> <span>Category</span></a></li>
<li><a href="user_income.php"><i class="lnr lnr-
pencil"></i> <span>Income</span></a></li>
<li><a href="user_expense.php"><i class="lnr lnr-
indent-increase"></i> <span>Expense</span></a></li>
<li><a href="user_view.php"><i class="lnr lnr-
eye"></i> <span>View</span></a></li>
<li><a href="user_report.php"><i class="lnr lnr-
book"></i> <span>Report</span></a></li>

52 | P a g e
<li><a href="index.php"><i class="lnr lnr-power-
switch"></i> <span>Logout</span></a></li>

</ul>
<!--sidebar nav end-->
</div>
</div>
<!-- left side end-->

<!-- main content start-->


<div class="main-content">
<!-- header-starts -->
<div class="header-section">

<!--toggle button start-->


<a class="toggle-btn menu-collapsed"><i class="fa fa-bars"></i></a>
<!--toggle button end-->

<!--notification menu start -->


<div class="menu-right">
<div class="user-panel-top">
<div class="profile_details_left">

</div>
<div class="profile_details">
<ul>
<li class="dropdown profile_details_drop">
<a href="#" class="dropdown-toggle"
data-toggle="dropdown" aria-expanded="false">
<div class="profile_img">
<span
style="background:url(images/user1.png) no-repeat center"> </span>

53 | P a g e
<div class="user-
name">
<p><?php echo
$e;?>

<span>User</span></p>
</div>
<i class="lnr lnr-
chevron-down"></i>
<i class="lnr lnr-
chevron-up"></i>
<div
class="clearfix"></div>
</div>
</a>
<ul class="dropdown-menu drp-mnu">

<li> <a href="index.php"><i


class="fa fa-sign-out"></i> Logout</a> </li>
</ul>
</li>
<div class="clearfix"> </div>
</ul>
</div>

<div class="clearfix"></div>
</div>
</div>
<!--notification menu end -->
</div>
<!-- //header-ends -->
<div id="page-wrapper">
<div class="graphs">
<div class="col_3">

54 | P a g e
<div class="col-md-3 widget widget1">
<div class="r3_counter_box"> <i class="fa fa-mail-
forward"></i> <div class="stats">
<h5>
<?php
echo $income;

?>
<span>$</span></h5>
<div class="grow">
<p>Amount</p>
</div>
</div>
</div>
</div>
<div class="col-md-3 widget widget1">
<div class="r3_counter_box"> <i class="fa fa-users"></i>
<div class="stats">
<h5> 100 <span>%</span></h5>
<div class="grow grow1">
<p>Income</p>
</div>
</div>
</div>
</div>
<div class="col-md-3 widget widget1">
<div class="r3_counter_box"> <i class="fa fa-
eye"></i> <div class="stats">
<h5>
<?php
$exp=($total/$income)*100;

55 | P a g e
echo round($exp);

?>
<span>%</span></h5>
<div class="grow grow3">
<p>Expense</p>
</div>
</div>
</div>
</div>
<div class="col-md-3 widget">
<div class="r3_counter_box"> <i class="fa fa-
usd"></i> <div class="stats">
<h5>
<?php
$profit=100-$exp;
echo round($profit);

?>
<span>%</span></h5>
<div class="grow grow2">
<p>Profit</p>
</div>
</div>
</div>
</div>
<div class="clearfix"> </div>
</div>
<!-- switches -->
<!-- //switches -->
</div>
<!--body wrapper start-->
</div>

56 | P a g e
<!--body wrapper end-->
</div>
<!--footer section start-->
<footer>
<p>&copy 2019 Easy Admin Panel. All Rights Reserved | Design by
admin.</p> </footer>
<!--footer section end-->

<!-- main content end-->


</section>

<script src="js/jquery.nicescroll.js"></script>
<script src="js/scripts.js"></script>
<!-- Bootstrap Core JavaScript -->
<script src="js/bootstrap.min.js"></script>
</body>
</html>
<?php
include("dbconnect.php");
session_start();
extract($_POST);

$e=$_SESSION['email'];

if(isset($_POST['btn']))
{
$max_qry = mysql_query("select max(id) from user_income");
$max_row = mysql_fetch_array($max_qry);
$id=$max_row['max(id)']+1;
echo $qry=mysql_query("insert into user_income values('$id','$e','$amt','$select')");
if($qry)
{
?>

57 | P a g e
<script language="javascript">
alert("Success");
window.location.href="user_income.php";

</script>
<?php
}
else
{
?>
<script language="javascript">
alert("Failed");
window.location.href="user_income.php";

</script>
<?php
}

}
?>
<!DOCTYPE HTML>
<html>
<head>
<title>Easy Admin Panel an Admin Panel Category Flat Bootstrap Responsive Website Template | Short
Codes :: w3layouts</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="Easy Admin Panel Responsive web template, Bootstrap Web
Templates, Flat Web Templates, Android Compatible web template,
Smartphone Compatible web template, free webdesigns for Nokia, Samsung, LG, SonyEricsson,
Motorola web design" />
<script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar,
0); }, false); function hideURLbar(){ window.scrollTo(0,1); } </script> <!-- Bootstrap Core CSS -->

58 | P a g e
<link href="css/bootstrap.min.css" rel='stylesheet' type='text/css'
/> <!-- Custom CSS -->
<link href="css/style.css" rel='stylesheet' type='text/css'
/> <!-- Graph CSS -->
<link href="css/font-awesome.css" rel="stylesheet">
<!-- jQuery -->
<!-- lined-icons -->
<link rel="stylesheet" href="css/icon-font.min.css" type='text/css' />
<!-- //lined-icons -->
<!-- chart -->
<script src="js/Chart.js"></script>
<!-- //chart -->
<!--animate-->
<link href="css/animate.css" rel="stylesheet" type="text/css"
media="all"> <script src="js/wow.min.js"></script>
<script>
new WOW().init();
</script>
<!--//end-animate-->
<!----webfonts--->
<link
href='//fonts.googleapis.com/css?family=Cabin:400,400italic,500,500italic,600,600italic,700,700italic'
rel='stylesheet' type='text/css'>
<!---//webfonts--->
<!-- Meters graphs -->
<script src="js/jquery-1.10.2.min.js"></script>
<!-- Placed js at the end of the document so the pages load faster -->

</head>

<body class="sticky-header left-side-collapsed" onload="initMap()">


<section>
<!-- left side start-->
<div class="left-side sticky-left-side">

59 | P a g e
<!--logo and iconic logo start-->
<div class="logo">
<h1><a href="index.html">Easy <span>Admin</span></a></h1>
</div>
<div class="logo-icon text-center">
<a href="index.html"><i class="lnr lnr-home"></i> </a>
</div>

<!--logo and iconic logo end-->


<div class="left-side-inner">

<!--sidebar nav start-->


<ul class="nav nav-pills nav-stacked custom-nav">
<li><a href="user_home.php"><i class="lnr lnr-
select"></i><span>Home</span></a></li>
<li ><a href="user_category.php"><i class="lnr lnr-
cog"></i> <span>Category</span></a></li>
<li class="active"><a href="user_income.php"><i
class="lnr lnr-pencil"></i> <span>Income</span></a></li>
<li><a href="user_expense.php"><i class="lnr lnr-
indent-increase"></i> <span>Expense</span></a></li>
<li><a href="user_view.php"><i class="lnr lnr-
eye"></i> <span>View</span></a></li>
<li><a href="user_report.php"><i class="lnr lnr-
book"></i> <span>Report</span></a></li>
<li><a href="index.php"><i class="lnr lnr-power-
switch"></i> <span>Logout</span></a></li>
</ul>
<!--sidebar nav end-->
</div>
</div>
<!-- left side end-->

60 | P a g e
<!-- main content start-->
<div class="main-content">
<!-- header-starts -->
<div class="header-section">

<!--toggle button start-->


<a class="toggle-btn menu-collapsed"><i class="fa fa-bars"></i></a>
<!--toggle button end-->

<!--notification menu start -->


<div class="menu-right">
<div class="user-panel-top">
<div class="profile_details">
<ul>
<li class="dropdown profile_details_drop">
<a href="#" class="dropdown-toggle"
data-toggle="dropdown" aria-expanded="false">
<div class="profile_img">
<span
style="background:url(images/user1.png) no-repeat center"> </span>
<div class="user-
name">
<p><?php echo
$e;?><span>user</span></p>
</div>
<i class="lnr lnr-
chevron-down"></i>
<i class="lnr lnr-
chevron-up"></i>
<div
class="clearfix"></div>
</div>
</a>
<ul class="dropdown-menu drp-mnu">

61 | P a g e
<li> <a href="index.php"><i
class="fa fa-sign-out"></i> Logout</a> </li>
</ul>
</li>
<div class="clearfix"> </div>
</ul>
</div>

</div>
</div>
<!--notification menu end -->
</div>
<!-- //header-ends -->
<div id="page-wrapper">
<div class="graphs">
<h3 class="blank1">USER INCOME DETAILS </h3>
<div class="grid_3 grid_4">
<div class="bs-example ">
<table class="table" >
<tbody>
<tr>
<td><h1 id="h1">&nbsp;</h1></td>
<td class="type-info"><div align="center">
<h1>ADD INCOME </h1>
</div></td>
<td class="type-info">&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td class="type-info"><form name="form1"
method="post" action="">

62 | P a g e
<table width="200" border="0"
align="center">
<tr>
<td>Amount</td>
<td><label>
<input type="number" name="amt" required=""
placeholder="Amount"> </label></td>
</tr>
<tr>
<td>Month</td>
<td><label>
<select name="select">
<?php
$i=1;
for($i;$i<=12;$i++)
{
?>
<option value="<?php echo $i;?>"><?php echo $i;?></option>
<?php
}
?>
</select>
</label></td>
</tr>
<tr>
<td>&nbsp;</td>
<td><label>
<input name="btn" type="submit" id="btn"
value="Submit"> <br>
</label></td>
</tr>
</table>
</form> </td>
<td class="type-info">&nbsp;</td>

63 | P a g e
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<!--footer section start-->
<footer>
<p>&copy 2019 Easy Admin Panel. All Rights Reserved | Design by
Admin.</a></p>
</footer>
<!--footer section end-->
</section>

<script src="js/jquery.nicescroll.js"></script>
<script src="js/scripts.js"></script>
<!-- Bootstrap Core JavaScript -->
<script src="js/bootstrap.min.js"></script>
</body>
</html>
<?php
include("dbconnect.php");
session_start();
extract($_POST);
if(isset($_POST['Submit2']))
{
$date =date("d-m-y");
$max_qry = mysql_query("select max(id) from user_details");
$max_row = mysql_fetch_array($max_qry);
$id=$max_row['max(id)']+1;
echo $qry=mysql_query("insert into user_details
values('$id','$username','$contact','$email','$address','$pass','$date')");

64 | P a g e
if($qry)
{
?>
<script language="javascript">
alert("Register Successfully..");
window.location.href="index.php";
</script>
<?php
}
else
{
?>
<script language="javascript">
alert("Failed..");
window.location.href="user_register.php";
</script>
<?php
}
}

?>
<!DOCTYPE HTML>
<html>
<head>
<title>Easy Admin Panel an Admin Panel Category Flat Bootstrap Responsive Website Template | Sign
In :: w3layouts</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="Easy Admin Panel Responsive web template, Bootstrap Web
Templates, Flat Web Templates, Android Compatible web template,
Smartphone Compatible web template, free webdesigns for Nokia, Samsung, LG, SonyEricsson,
Motorola web design" />

65 | P a g e
<script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar,
0); }, false); function hideURLbar(){ window.scrollTo(0,1); } </script> <!-- Bootstrap Core CSS -->

<link href="css/bootstrap.min.css" rel='stylesheet' type='text/css'


/> <!-- Custom CSS -->
<link href="css/style.css" rel='stylesheet' type='text/css'
/> <!-- Graph CSS -->
<link href="css/font-awesome.css" rel="stylesheet">
<!-- jQuery -->
<!-- lined-icons -->
<link rel="stylesheet" href="css/icon-font.min.css" type='text/css' />
<!-- //lined-icons -->
<!-- chart -->
<script src="js/Chart.js"></script>
<!-- //chart -->
<!--animate-->
<link href="css/animate.css" rel="stylesheet" type="text/css"
media="all"> <script src="js/wow.min.js"></script>
<script>
new WOW().init();
</script>
<!--//end-animate-->
<!----webfonts--->
<link
href='//fonts.googleapis.com/css?family=Cabin:400,400italic,500,500italic,600,600italic,700,700italic'
rel='stylesheet' type='text/css'>
<!---//webfonts--->
<!-- Meters graphs -->
<script src="js/jquery-1.10.2.min.js"></script>
<!-- Placed js at the end of the document so the pages load faster -->

</head>

<body class="sign-in-up">

66 | P a g e
<section>
<div id="page-wrapper" class="sign-in-wrapper">
<div class="graphs">
<div class="sign-in-form">
<div class="sign-in-form-top">
<p><a href="index.php">Sign Up </a></p>
</div>
<div class="signin">

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


<div class="log-input">

<div class="log-input-center">
<input type="text"
Placeholder="Your Name" required="" name="username" />
</div>

</div>
<div class="log-input">

<div class="log-input-center">
<input type="text"
Placeholder="Contact" required="" name="contact" />
</div>

</div>
<div class="log-input">

<div class="log-input-center">
<input type="text"
Placeholder="Email" required="" name="email" />
</div>

</div>

67 | P a g e
<div class="log-input">

<div class="log-input-center">
<input type="text"
Placeholder="Address" required="" name="address" />
</div>

</div>

<div class="log-input">
<div class="log-input-center">
<input type="password"
Placeholder="password" required="" name="pass"/>
</div>

</div>

<input type="submit" name="Submit2"


value="Register your account Now">

</form>
</div>

</div>
</div>
</div>
<!--footer section start-->

<!--footer section end-->


</section>

<script src="js/jquery.nicescroll.js"></script>
<script src="js/scripts.js"></script>

68 | P a g e
<!-- Bootstrap Core JavaScript -->
<script src="js/bootstrap.min.js"></script>
</body>
</html>
<?php
include("dbconnect.php");
session_start();
extract($_POST);

$e=$_SESSION['email'];
if(isset($_POST['btn']))
{
$_SESSION['dd']=$select;
header("Location:user_report_1.php?dd=$select");
}
?>
<!DOCTYPE HTML>
<html>
<head>
<title>Easy Admin Panel an Admin Panel Category Flat Bootstrap Responsive Website Template | Short
Codes :: w3layouts</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="Easy Admin Panel Responsive web template, Bootstrap Web
Templates, Flat Web Templates, Android Compatible web template,
Smartphone Compatible web template, free webdesigns for Nokia, Samsung, LG, SonyEricsson,
Motorola web design" />
<script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar,
0); }, false); function hideURLbar(){ window.scrollTo(0,1); } </script> <!-- Bootstrap Core CSS -->

<link href="css/bootstrap.min.css" rel='stylesheet' type='text/css'


/> <!-- Custom CSS -->
<link href="css/style.css" rel='stylesheet' type='text/css'
/> <!-- Graph CSS -->

69 | P a g e
<link href="css/font-awesome.css" rel="stylesheet">
<!-- jQuery -->
<!-- lined-icons -->
<link rel="stylesheet" href="css/icon-font.min.css" type='text/css' />
<!-- //lined-icons -->
<!-- chart -->
<script src="js/Chart.js"></script>
<!-- //chart -->
<!--animate-->
<link href="css/animate.css" rel="stylesheet" type="text/css"
media="all"> <script src="js/wow.min.js"></script>
<script>
new WOW().init();
</script>
<!--//end-animate-->
<!----webfonts--->
<link
href='//fonts.googleapis.com/css?family=Cabin:400,400italic,500,500italic,600,600italic,700,700italic'
rel='stylesheet' type='text/css'>
<!---//webfonts--->
<!-- Meters graphs -->
<script src="js/jquery-1.10.2.min.js"></script>
<!-- Placed js at the end of the document so the pages load faster -->

</head>

<body class="sticky-header left-side-collapsed" onload="initMap()">


<section>
<!-- left side start-->
<div class="left-side sticky-left-side">

<!--logo and iconic logo start-->


<div class="logo">
<h1><a href="index.html">Easy <span>Admin</span></a></h1>

70 | P a g e
</div>
<div class="logo-icon text-center">
<a href="index.html"><i class="lnr lnr-home"></i> </a>
</div>

<!--logo and iconic logo end-->


<div class="left-side-inner">

<!--sidebar nav start-->


<ul class="nav nav-pills nav-stacked custom-nav">
<li><a href="user_home.php"><i class="lnr lnr-
select"></i><span>Home</span></a></li>
<li ><a href="user_category.php"><i class="lnr lnr-
cog"></i> <span>Category</span></a></li>
<li><a href="user_income.php"><i class="lnr lnr-
pencil"></i> <span>Income</span></a></li>
<li><a href="user_expense.php"><i class="lnr lnr-
indent-increase"></i> <span>Expense</span></a></li>
<li ><a href="user_view.php"><i class="lnr lnr-
eye"></i> <span>View</span></a></li>
<li class="active"><a href="user_report.php"><i
class="lnr lnr-book"></i> <span>Report</span></a></li>
<li><a href="index.php"><i class="lnr lnr-power-
switch"></i> <span>Logout</span></a></li>
</ul>
<!--sidebar nav end-->
</div>
</div>
<!-- left side end-->

<!-- main content start-->


<div class="main-content">
<!-- header-starts -->
<div class="header-section">

71 | P a g e
<!--toggle button start-->
<a class="toggle-btn menu-collapsed"><i class="fa fa-bars"></i></a>
<!--toggle button end-->

<!--notification menu start -->


<div class="menu-right">
<div class="user-panel-top">
<div class="profile_details">
<ul>
<li class="dropdown profile_details_drop">
<a href="#" class="dropdown-toggle"
data-toggle="dropdown" aria-expanded="false">
<div class="profile_img">
<span
style="background:url(images/user1.png) no-repeat center"> </span>
<div class="user-
name">
<p><?php echo
$e;?><span>user</span></p>
</div>
<i class="lnr lnr-
chevron-down"></i>
<i class="lnr lnr-
chevron-up"></i>
<div
class="clearfix"></div>
</div>
</a>
<ul class="dropdown-menu drp-mnu">

<li> <a href="index.php"><i


class="fa fa-sign-out"></i> Logout</a> </li>
</ul>

72 | P a g e
</li>
<div class="clearfix"> </div>
</ul>
</div>

</div>
</div>
<!--notification menu end -->
</div>
<!-- //header-ends -->
<div id="page-wrapper">
<div class="graphs">
<h3 class="blank1">Expense Details </h3>
<div class="grid_3 grid_4">
<div class="bs-example ">
<table class="table" >
<tbody>
<tr>
<td><h1 id="h1">&nbsp;</h1></td>
<td class="type-info"><div align="center">
<h1>EXPENSE REPORT </h1>
</div></td>
<td class="type-info">&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td class="type-info"><form name="form1"
method="post" action="">
<table width="200" border="0"
align="center">
<tr>
<td>Month</td>
<td><select name="select">

73 | P a g e
<?php
$i=1;
for($i;$i<=12;$i++)
{
?>
<option value="<?php echo $i;?>"><?php echo $i;?></option>
<?php
}
?>
</select></td>
</tr>
<tr>
<td>&nbsp;</td>
<td><label></label>
<label>
<input name="btn" type="submit" id="btn"
value="Submit"> </label></td>
</tr>
</table>
</form>
</td>
<td class="type-info">&nbsp;</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<!--footer section start-->
<footer>
<p>&copy 2019 Easy Admin Panel. All RightsReserved | Design by
Admin.</a></p>

74 | P a g e
</footer>
<!--footer section end-->
</section>

<script src="js/jquery.nicescroll.js"></script>
<script src="js/scripts.js"></script>
<!-- Bootstrap Core JavaScript -->
<script src="js/bootstrap.min.js"></script>
</body>
</html>
<?php
include("dbconnect.php");
session_start();
extract($_POST);
$dd =$_SESSION['dd'];
$e=$_SESSION['email'];
$xyz=mysql_query("select * from user_expense where user='$e' and month='$dd'");

$total=0;
$xyz1=mysql_query("select * from user_income where user='$e' and month='$dd'");
while($row1=mysql_fetch_array($xyz1))
{
$income=$row1['amount'];
}
?>
<!DOCTYPE HTML>
<html>
<head>
<title>Easy Admin Panel an Admin Panel Category Flat Bootstrap Responsive Website Template | Short
Codes :: w3layouts</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="Easy Admin Panel Responsive web template, Bootstrap Web
Templates, Flat Web Templates, Android Compatible web template,

75 | P a g e
Smartphone Compatible web template, free webdesigns for Nokia, Samsung, LG, SonyEricsson,
Motorola web design" />
<script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar,
0); }, false); function hideURLbar(){ window.scrollTo(0,1); } </script> <!-- Bootstrap Core CSS -->

<link href="css/bootstrap.min.css" rel='stylesheet' type='text/css'


/> <!-- Custom CSS -->
<link href="css/style.css" rel='stylesheet' type='text/css'
/> <!-- Graph CSS -->
<link href="css/font-awesome.css" rel="stylesheet">
<!-- jQuery -->
<!-- lined-icons -->
<link rel="stylesheet" href="css/icon-font.min.css" type='text/css' />
<!-- //lined-icons -->
<!-- chart -->
<script src="js/Chart.js"></script>
<!-- //chart -->
<!--animate-->
<link href="css/animate.css" rel="stylesheet" type="text/css"
media="all"> <script src="js/wow.min.js"></script>
<script>
new WOW().init();
</script>
<!--//end-animate-->
<!----webfonts--->
<link
href='//fonts.googleapis.com/css?family=Cabin:400,400italic,500,500italic,600,600italic,700,700italic'
rel='stylesheet' type='text/css'>
<!---//webfonts--->
<!-- Meters graphs -->
<script src="js/jquery-1.10.2.min.js"></script>
<!-- Placed js at the end of the document so the pages load faster -->

</head>

76 | P a g e
<body class="sticky-header left-side-collapsed" onload="initMap()">
<section>
<!-- left side start-->
<div class="left-side sticky-left-side">

<!--logo and iconic logo start-->


<div class="logo">
<h1><a href="index.php">Easy <span>Admin</span></a></h1>
</div>
<div class="logo-icon text-center">
<a href="index.php"><i class="lnr lnr-home"></i> </a>
</div>

<!--logo and iconic logo end-->


<div class="left-side-inner">

<!--sidebar nav start-->


<ul class="nav nav-pills nav-stacked custom-nav">
<li><a href="user_home.php"><i class="lnr lnr-
select"></i><span>Home</span></a></li>
<li ><a href="user_category.php"><i class="lnr lnr-
cog"></i> <span>Category</span></a></li>
<li><a href="user_income.php"><i class="lnr lnr-
pencil"></i> <span>Income</span></a></li>
<li><a href="user_expense.php"><i class="lnr lnr-
indent-increase"></i> <span>Expense</span></a></li>
<li ><a href="user_view.php"><i class="lnr lnr-
eye"></i> <span>View</span></a></li>
<li class="active"><a href="user_report.php"><i
class="lnr lnr-book"></i> <span>Report</span></a></li>
<li><a href="index.php"><i class="lnr lnr-power-
switch"></i> <span>Logout</span></a></li>
</ul>

77 | P a g e
<!--sidebar nav end-->
</div>
</div>
<!-- left side end-->

<!-- main content start-->


<div class="main-content">
<!-- header-starts -->
<div class="header-section">

<!--toggle button start-->


<a class="toggle-btn menu-collapsed"><i class="fa fa-bars"></i></a>
<!--toggle button end-->

<!--notification menu start -->


<div class="menu-right">
<div class="user-panel-top">
<div class="profile_details">
<ul>
<li class="dropdown profile_details_drop">
<a href="#" class="dropdown-toggle"
data-toggle="dropdown" aria-expanded="false">
<div class="profile_img">
<span
style="background:url(images/user1.png) no-repeat center"> </span>
<div class="user-
name">
<p><?php echo
$e;?><span>user</span></p>
</div>
<i class="lnr lnr-
chevron-down"></i>
<i class="lnr lnr-
chevron-up"></i>

78 | P a g e
<div
class="clearfix"></div>
</div>
</a>
<ul class="dropdown-menu drp-mnu">

<li> <a href="index.php"><i


class="fa fa-sign-out"></i> Logout</a> </li>
</ul>
</li>
<div class="clearfix"> </div>
</ul>
</div>

</div>
</div>
<!--notification menu end -->
</div>
<!-- //header-ends -->
<div id="page-wrapper">
<div class="graphs">
<h3 class="blank1">Expense Details </h3>
<div class="grid_3 grid_4">
<div class="bs-example ">
<table class="table" >
<tbody>
<tr>
<td><h1 id="h1">&nbsp;</h1></td>
<td class="type-info"><div align="center">
<h1>EXPENSE</h1>
</div></td>
<td class="type-info">&nbsp;</td>
</tr>

79 | P a g e
<tr>
<td>&nbsp;</td>
<td class="type-info"><table class="table">
<thead>
<tr>
<th>#</th>
<th>Date</th>
<th>Month</th>
<th>Category</th>
<th>Amount</th>
</tr>
</thead>
<tbody>
<?php
$a=1;
while($row=mysql_fetch_array($xyz))
{

$b=$a%2;
if($b==0)
{
?>
<tr class="info">
<?php

}
?>
<th scope="row"><?php echo $a; ?></th>
<td><?php echo $row['cdate'];?></td>
<td><?php echo $row['month'];?></td>
<td><?php echo $row['category'];?></td>
<td><?php echo $row['amount'];
$total= $total+$row['amount'];
?></td>

80 | P a g e
</tr>

<?php
$a++;
}
?>
<tr >
<th scope="row">&nbsp;</th>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr class="danger">
<th scope="row">&nbsp;</th>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>Total Expense </td>
<td><?php echo $total;?>&nbsp;</td>
</tr>
<tr class="danger">
<th scope="row">&nbsp;</th>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>Total Income </td>
<td><?php echo $income;?>&nbsp;</td>
</tr>
<tr class="danger">
<th scope="row">&nbsp;</th>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>Balance</td>
<td><?php
$a=$income-$total;

81 | P a g e
echo $a;

?>&nbsp;</td>
</tr>
</tbody>
</table></td>
<td class="type-info">&nbsp;</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="graphs">
<div class="col_3">
<div class="col-md-3 widget widget1">
<div class="r3_counter_box"> <i class="fa fa-mail-
forward"></i> <div class="stats">
<h5>
<?php
echo $income;

?>
<span>$</span></h5>
<div class="grow">
<p>Amount</p>
</div>
</div>
</div>
</div>
<div class="col-md-3 widget widget1">
<div class="r3_counter_box"> <i class="fa fa-users"></i>

82 | P a g e
<div class="stats">
<h5> 100 <span>%</span></h5>
<div class="grow grow1">
<p>Income</p>
</div>
</div>
</div>
</div>
<div class="col-md-3 widget widget1">
<div class="r3_counter_box"> <i class="fa fa-
eye"></i> <div class="stats">
<h5>
<?php
echo $exp=($total/$income)*100;

?>
<span>%</span></h5>
<div class="grow grow3">
<p>Expense</p>
</div>
</div>
</div>
</div>
<div class="col-md-3 widget">
<div class="r3_counter_box"> <i class="fa fa-
usd"></i> <div class="stats">
<h5>
<?php
echo $profit=100-$exp;

83 | P a g e
?>
<span>%</span></h5>
<div class="grow grow2">
<p>Profit</p>
</div>
</div>
</div>
</div>
<div class="clearfix"> </div>
</div>
<!-- switches -->
<div class="switches">
<div class="col-4"></div>
</div>
<!-- //switches -->
</div>
</div>
</div>
<!--footer section start-->
<footer>
<p>&copy 2019 Easy Admin Panel. All RightsReserved | Design by
Admin.</a></p>
</footer>
<!--footer section end-->
</section>

<script src="js/jquery.nicescroll.js"></script>
<script src="js/scripts.js"></script>
<!-- Bootstrap Core JavaScript -->
<script src="js/bootstrap.min.js"></script>
</body>
</html>
<?php
include("dbconnect.php");

84 | P a g e
session_start();
extract($_POST);
$dd =date("m");
$e=$_SESSION['email'];
$xyz=mysql_query("select * from user_expense where user='$e' and month='$dd'");

$total=0;
$xyz1=mysql_query("select * from user_income where user='$e' and month='$dd'");
while($row1=mysql_fetch_array($xyz1))
{
$income=$row1['amount'];
}
?>
<!DOCTYPE HTML>
<html>
<head>
<title>Easy Admin Panel an Admin Panel Category Flat Bootstrap Responsive Website Template | Short
Codes :: w3layouts</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="Easy Admin Panel Responsive web template, Bootstrap Web
Templates, Flat Web Templates, Android Compatible web template,
Smartphone Compatible web template, free webdesigns for Nokia, Samsung, LG, SonyEricsson,
Motorola web design" />
<script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar,
0); }, false); function hideURLbar(){ window.scrollTo(0,1); } </script> <!-- Bootstrap Core CSS -->

<link href="css/bootstrap.min.css" rel='stylesheet' type='text/css'


/> <!-- Custom CSS -->
<link href="css/style.css" rel='stylesheet' type='text/css'
/> <!-- Graph CSS -->
<link href="css/font-awesome.css" rel="stylesheet">
<!-- jQuery -->
<!-- lined-icons -->

85 | P a g e
<link rel="stylesheet" href="css/icon-font.min.css" type='text/css' />
<!-- //lined-icons -->
<!-- chart -->
<script src="js/Chart.js"></script>
<!-- //chart -->
<!--animate-->
<link href="css/animate.css" rel="stylesheet" type="text/css"
media="all"> <script src="js/wow.min.js"></script>
<script>
new WOW().init();
</script>
<!--//end-animate-->
<!----webfonts--->
<link
href='//fonts.googleapis.com/css?family=Cabin:400,400italic,500,500italic,600,600italic,700,700italic'
rel='stylesheet' type='text/css'>
<!---//webfonts--->
<!-- Meters graphs -->
<script src="js/jquery-1.10.2.min.js"></script>
<!-- Placed js at the end of the document so the pages load faster -->

</head>

<body class="sticky-header left-side-collapsed" onload="initMap()">


<section>
<!-- left side start-->
<div class="left-side sticky-left-side">

<!--logo and iconic logo start-->


<div class="logo">
<h1><a href="index.html">Easy <span>Admin</span></a></h1>
</div>
<div class="logo-icon text-center">
<a href="index.html"><i class="lnr lnr-home"></i> </a>

86 | P a g e
</div>

<!--logo and iconic logo end-->


<div class="left-side-inner">

<!--sidebar nav start-->


<ul class="nav nav-pills nav-stacked custom-nav">
<li><a href="user_home.php"><i class="lnr lnr-
select"></i><span>Home</span></a></li>
<li ><a href="user_category.php"><i class="lnr lnr-
cog"></i> <span>Category</span></a></li>
<li><a href="user_income.php"><i class="lnr lnr-
pencil"></i> <span>Income</span></a></li>
<li><a href="user_expense.php"><i class="lnr lnr-
indent-increase"></i> <span>Expense</span></a></li>
<li class="active"><a href="user_view.php"><i
class="lnr lnr-eye"></i> <span>View</span></a></li>
<li><a href="user_report.php"><i class="lnr lnr-
book"></i> <span>Report</span></a></li>
<li><a href="index.php"><i class="lnr lnr-power-
switch"></i> <span>Logout</span></a></li>
</ul>
<!--sidebar nav end-->
</div>
</div>
<!-- left side end-->

<!-- main content start-->


<div class="main-content">
<!-- header-starts -->
<div class="header-section">

<!--toggle button start-->


<a class="toggle-btn menu-collapsed"><i class="fa fa-bars"></i></a>

87 | P a g e
<!--toggle button end-->

<!--notification menu start -->


<div class="menu-right">
<div class="user-panel-top">
<div class="profile_details">
<ul>
<li class="dropdown profile_details_drop">
<a href="#" class="dropdown-toggle"
data-toggle="dropdown" aria-expanded="false">
<div class="profile_img">
<span
style="background:url(images/user1.png) no-repeat center"> </span>
<div class="user-
name">
<p><?php echo
$e;?><span>user</span></p>
</div>
<i class="lnr lnr-
chevron-down"></i>
<i class="lnr lnr-
chevron-up"></i>
<div
class="clearfix"></div>
</div>
</a>
<ul class="dropdown-menu drp-mnu">

<li> <a href="index.php"><i


class="fa fa-sign-out"></i> Logout</a> </li>
</ul>
</li>
<div class="clearfix"> </div>
</ul>

88 | P a g e
</div>

</div>
</div>
<!--notification menu end -->
</div>
<!-- //header-ends -->
<div id="page-wrapper">
<div class="graphs">
<h3 class="blank1">Expense Details </h3>
<div class="grid_3 grid_4">
<div class="bs-example ">
<table class="table" >
<tbody>
<tr>
<td><h1 id="h1">&nbsp;</h1></td>
<td class="type-info"><div align="center">
<h1>EXPENSE</h1>
</div></td>
<td class="type-info">&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td class="type-info"><table class="table">
<thead>
<tr>
<th>#</th>
<th>Date</th>
<th>Month</th>
<th>Category</th>
<th>Amount</th>
</tr>
</thead>

89 | P a g e
<tbody>
<?php
$a=1;
while($row=mysql_fetch_array($xyz))
{

$b=$a%2;
if($b==0)
{
?>
<tr class="info">
<?php

}
?>
<th scope="row"><?php echo $a; ?></th>
<td><?php echo $row['cdate'];?></td>
<td><?php echo $row['month'];?></td>
<td><?php echo $row['category'];?></td>
<td><?php echo $row['amount'];
$total= $total+$row['amount'];
?></td>
</tr>

<?php
$a++;
}
?>
<tr >
<th scope="row">&nbsp;</th>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>

90 | P a g e
</tr>
<tr class="danger">
<th scope="row">&nbsp;</th>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>Total Expense </td>
<td><?php echo $total;?>&nbsp;</td>
</tr>
<tr class="danger">
<th scope="row">&nbsp;</th>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>Total Income </td>
<td><?php echo $income;?>&nbsp;</td>
</tr>
<tr class="danger">
<th scope="row">&nbsp;</th>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>Balance</td>
<td><?php
$a=$income-$total;
echo $a;

?>&nbsp;</td>
</tr>
</tbody>
</table></td>
<td class="type-info">&nbsp;</td>
</tr>
</tbody>
</table>
</div>
</div>

91 | P a g e
</div>
<div class="graphs">
<div class="col_3">
<div class="col-md-3 widget widget1">
<div class="r3_counter_box"> <i class="fa fa-mail-
forward"></i> <div class="stats">
<h5><?php
echo $income;

?> <span>$</span></h5>
<div class="grow">
<p>Amount</p>
</div>
</div>
</div>
</div>
<div class="col-md-3 widget widget1">
<div class="r3_counter_box"> <i class="fa fa-
users"></i> <div class="stats">
<h5>
100
<span>%</span></h5>
<div class="grow grow1">
<p>Income</p>
</div>
</div>
</div>
</div>
<div class="col-md-3 widget widget1">
<div class="r3_counter_box"> <i class="fa fa-
eye"></i> <div class="stats">
<h5>

92 | P a g e
<?php
echo $exp=($total/$income)*100;

?>
<span>%</span></h5>
<div class="grow grow3">
<p>Expense</p>
</div>
</div>
</div>
</div>
<div class="col-md-3 widget">
<div class="r3_counter_box"> <i class="fa fa-
usd"></i> <div class="stats">
<h5>
<?php
echo $profit=100-$exp;

?>
<span>%</span></h5>
<div class="grow grow2">
<p>Profit</p>
</div>
</div>
</div>
</div>
<div class="clearfix"> </div>
</div>
<!-- switches -->
<div class="switches">

93 | P a g e
<div class="col-4"></div>
</div>
<!-- //switches -->
</div>
</div>
</div>
<!--footer section start-->
<footer>
<p>&copy 2019 Easy Admin Panel. All RightsReserved | Design by
Admin.</a></p>
</footer>
<!--footer section end-->
</section>

<script src="js/jquery.nicescroll.js"></script>
<script src="js/scripts.js"></script>
<!-- Bootstrap Core JavaScript -->
<script src="js/bootstrap.min.js"></script>
</body>
</html>

94 | P a g e
8.2 O/P SCREENS

95 | P a g e
96 | P a g e
97 | P a g e
98 | P a g e
99 | P a g e
100 | P a g e
101 | P a g e
Folder Structure
pgsql
CopyEdit
expense-tracker/

├── db.php
├── index.php
├── add_expense.php
├── delete_expense.php
└── style.css

expense-tracker/

├── config/
│ └── db.php # Database connection file

├── includes/
│ ├── header.php # Reusable header (optional)
│ └── footer.php # Reusable footer (optional)

├── public/
│ ├── index.php # Main dashboard to list expenses
│ ├── add_expense.php # Handles expense addition
│ ├── delete_expense.php # Handles deleting an expense
│ ├── login.php # (Optional) Login page
│ ├── logout.php # (Optional) Logout script
│ └── register.php # (Optional) User registration

├── assets/
│ ├── css/
│ │ └── style.css # Main styles
│ └── js/
│ └── script.js # (Optional) JavaScript logic

├── sql/
│ └── schema.sql # SQL script to create database and tables

├── uploads/ # (Optional) Folder for any uploaded files/receipts

└── README.md # Project documentation (optional)
1. db.php — Database Connection
php
CopyEdit
<?php
$host = "localhost";
$user = "root";
$password = "";
$db = "expense_tracker";

$conn = new mysqli($host, $user, $password, $db);

if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
?>

Place this file inside a config/ folder (or root directory if you're keeping it simple):

php
CopyEdit
<?php
// config/db.php

$host = "localhost"; // Database host


$user = "root"; // Database username
$password = ""; // Database password
$database = "expense_tracker"; // Database name

// Create connection
$conn = new mysqli($host, $user, $password, $database);

// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
?>

✅ Tips
1. Security: Never expose db.php to the public. Place it in a secure folder.
2. Reusability: Use include 'config/db.php'; or require_once in other PHP files to reuse
the connection.
3. Error Handling: For production, replace die() with proper logging to avoid showing
sensitive info.
Example Usage in a Page
php
CopyEdit
<?php
include '../config/db.php'; // adjust the path as needed

$sql = "SELECT * FROM expenses";


$result = $conn->query($sql);

// Use $result...
?>

2. index.php — Home Page


php
CopyEdit
<?php
include 'db.php';

// Fetch all expenses


$sql = "SELECT * FROM expenses ORDER BY date DESC";
$result = $conn->query($sql);

// Total
$total = 0;
?>

<!DOCTYPE html>
<html>
<head>
<title>Expense Tracker</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<h2>Expense Tracker</h2>

<form action="add_expense.php" method="POST">


<input type="text" name="title" placeholder="Expense Title"
required>
<input type="number" step="0.01" name="amount"
placeholder="Amount" required>
<input type="date" name="date" required>
<button type="submit">Add Expense</button>
</form>

<table>
<tr>
<th>Title</th>
<th>Amount</th>
<th>Date</th>
<th>Action</th>
</tr>

<?php while($row = $result->fetch_assoc()):


$total += $row['amount'];
?>
<tr>
<td><?= htmlspecialchars($row['title']) ?></td>
<td>$<?= number_format($row['amount'], 2) ?></td>
<td><?= $row['date'] ?></td>
<td><a href="delete_expense.php?id=<?=
$row['id'] ?>">Delete</a></td>
</tr>
<?php endwhile; ?>
</table>

<h3>Total Spent: $<?= number_format($total, 2) ?></h3>


</body>
</html>

Home Page (index.php) for your Expense Tracker Management System using PHP and MySQL.
This page will:

 Connect to the database


 Display all expenses
 Show a form to add new expenses
 Calculate total expenses
 Allow deletion of entries

index.php

php
CopyEdit
<?php
include 'config/db.php';

// Fetch all expenses from the database


$sql = "SELECT * FROM expenses ORDER BY date DESC";
$result = $conn->query($sql);

$total = 0;
?>

<!DOCTYPE html>
<html>
<head>
<title>Expense Tracker</title>
<link rel="stylesheet" href="assets/css/style.css">
</head>
<body>
<h2>Expense Tracker System</h2>

<!-- Expense Form -->


<form action="public/add_expense.php" method="POST">
<input type="text" name="title" placeholder="Expense Title" required>
<input type="number" step="0.01" name="amount" placeholder="Amount"
required>
<input type="date" name="date" required>
<button type="submit">Add Expense</button>
</form>

<!-- Expense List Table -->


<table>
<tr>
<th>Title</th>
<th>Amount</th>
<th>Date</th>
<th>Action</th>
</tr>

<?php while($row = $result->fetch_assoc()):


$total += $row['amount'];
?>
<tr>
<td><?= htmlspecialchars($row['title']) ?></td>
<td>$<?= number_format($row['amount'], 2) ?></td>
<td><?= $row['date'] ?></td>
<td><a href="public/delete_expense.php?id=<?= $row['id'] ?>"
onclick="return confirm('Delete this expense?');">Delete</a></td>
</tr>
<?php endwhile; ?>
</table>

<h3>Total Expenses: $<?= number_format($total, 2) ?></h3>


</body>
</html>

Table Schema (if not created yet)


Run this SQL to set up your database:

sql
CopyEdit
CREATE DATABASE IF NOT EXISTS expense_tracker;
USE expense_tracker;

CREATE TABLE IF NOT EXISTS expenses (


id INT AUTO_INCREMENT PRIMARY KEY,
title VARCHAR(255) NOT NULL,
amount DECIMAL(10, 2) NOT NULL,
date DATE NOT NULL
➕ 3. add_expense.php — Add Expense Logic
php
CopyEdit
<?php
include 'db.php';

if ($_SERVER["REQUEST_METHOD"] == "POST") {
$title = $_POST['title'];
$amount = $_POST['amount'];
$date = $_POST['date'];

$stmt = $conn->prepare("INSERT INTO expenses (title, amount,


date) VALUES (?, ?, ?)");
$stmt->bind_param("sds", $title, $amount, $date);
$stmt->execute();

header("Location: index.php");
exit();
}
?>

add_expense.php

php
CopyEdit
<?php
include '../config/db.php'; // Adjust path if needed

if ($_SERVER["REQUEST_METHOD"] == "POST") {
// Retrieve and sanitize input
$title = trim($_POST['title']);
$amount = floatval($_POST['amount']);
$date = $_POST['date'];

if (!empty($title) && $amount > 0 && !empty($date)) {


// Prepare SQL statement to prevent SQL injection
$stmt = $conn->prepare("INSERT INTO expenses (title, amount, date) VALUES
(?, ?, ?)");
$stmt->bind_param("sds", $title, $amount, $date);

if ($stmt->execute()) {
header("Location: ../index.php");
exit();
} else {
echo "Error: " . $stmt->error;
}
} else {
echo "Please fill in all fields correctly.";
}
}
?>
❌ 4. delete_expense.php — Delete Expense Logic
php
CopyEdit
<?php
include 'db.php';

if (isset($_GET['id'])) {
$id = $_GET['id'];
$conn->query("DELETE FROM expenses WHERE id = $id");
}

header("Location: index.php");
exit();
?>

delete_expense.php

php
CopyEdit
<?php
include '../config/db.php'; // Adjust the path if needed

if (isset($_GET['id']) && is_numeric($_GET['id'])) {


$id = intval($_GET['id']);

// Prepare statement to avoid SQL injection


$stmt = $conn->prepare("DELETE FROM expenses WHERE id = ?");
$stmt->bind_param("i", $id);

if ($stmt->execute()) {
// Redirect back to home after successful delete
header("Location: ../index.php");
exit();
} else {
echo "Error deleting record: " . $stmt->error;
}
} else {
echo "Invalid expense ID.";
}
?>

5. MySQL Table
Run this SQL in phpMyAdmin or MySQL shell:

sql
CopyEdit
CREATE DATABASE IF NOT EXISTS expense_tracker;
USE expense_tracker;

CREATE TABLE IF NOT EXISTS expenses (


id INT AUTO_INCREMENT PRIMARY KEY,
title VARCHAR(255) NOT NULL,
amount DECIMAL(10, 2) NOT NULL,
date DATE NOT NULL
);

MySQL Table Creation Script


sql
CopyEdit
-- Create the database
CREATE DATABASE IF NOT EXISTS expense_tracker;

-- Select the database


USE expense_tracker;

-- Create the expenses table


CREATE TABLE IF NOT EXISTS expenses (
id INT AUTO_INCREMENT PRIMARY KEY,
title VARCHAR(255) NOT NULL,
amount DECIMAL(10, 2) NOT NULL,
date DATE NOT NULL,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

Table Overview
Column Type Description
Unique ID for
id INT (PK)
each expense
Title or
title VARCHAR(255) description of
the expense
Expense
amount DECIMAL(10,2)
amount
Date of the
date DATE
expense
Auto
timestamp for
created_at TIMESTAMP
record
creation
Column Type Description

Table Name: expenses


This table stores all expense entries submitted by the user.

Column
Data Type Attributes Description
Name
Unique
AUTO_INCREMENT,
id INT
PRIMARY KEY
identifier for
each expense
Description or
title VARCHAR(255) NOT NULL name of the
expense
Monetary
amount DECIMAL(10,2) NOT NULL value of the
expense
Date when the
date DATE NOT NULL expense
occurred
Auto-
created_at TIMESTAMP
DEFAULT generated time
CURRENT_TIMESTAMP when record is
added

Example Data
id title amount date created_at
1 Grocery 45.50 2025-05-25 2025-05-25 10:15:00
2 Internet Bill 30.00 2025-05-24 2025-05-24 11:12:30
3 Transport 12.75 2025-05-23 2025-05-23 09:30:00

Optional Enhancements
If you plan to scale the app later:

Additional Column Purpose


user_id Link expenses to a specific user
category Add types like "Food", "Bills", etc
notes Extra details about the expense
Optional Enhancements you can add to your Expense Tracker Management System to make it
more powerful, user-friendly, and scalable:

1. User Authentication
Support for multiple users

Add tables:

 users — store login credentials


 Link expenses.user_id to users.id

Features:

 Login/Register pages
 Only show expenses for the logged-in user
 Session-based access control

Database Setup
Add a users table to your database:

sql
CopyEdit
CREATE TABLE users (
id INT AUTO_INCREMENT PRIMARY KEY,
username VARCHAR(50) NOT NULL UNIQUE,
email VARCHAR(100) NOT NULL UNIQUE,
password VARCHAR(255) NOT NULL,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

-- Update expenses table to link with users:


ALTER TABLE expenses ADD COLUMN user_id INT NOT NULL AFTER id;
ALTER TABLE expenses ADD FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE
CASCADE;

2. Registration (register.php)
php
CopyEdit
<?php
session_start();
include 'config/db.php';
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
$username = trim($_POST['username']);
$email = trim($_POST['email']);
$password = $_POST['password'];
$confirm_password = $_POST['confirm_password'];

if ($password === $confirm_password) {


$hashed_password = password_hash($password, PASSWORD_DEFAULT);

$stmt = $conn->prepare("INSERT INTO users (username, email, password)


VALUES (?, ?, ?)");
$stmt->bind_param("sss", $username, $email, $hashed_password);

if ($stmt->execute()) {
$_SESSION['user_id'] = $stmt->insert_id;
$_SESSION['username'] = $username;
header("Location: index.php");
exit();
} else {
$error = "User already exists or error occurred.";
}
} else {
$error = "Passwords do not match.";
}
}
?>

<!-- Simple HTML form -->


<!DOCTYPE html>
<html>

<head><title>Register</title></head>
<body>
<h2>Register</h2>
<?php if (!empty($error)) echo "<p style='color:red;'>$error</p>"; ?>
<form method="POST" action="">
<input type="text" name="username" placeholder="Username" required><br><br>
<input type="email" name="email" placeholder="Email" required><br><br>
<input type="password" name="password" placeholder="Password"
required><br><br>
<input type="password" name="confirm_password" placeholder="Confirm Password"
required><br><br>
<button type="submit">Register</button>
</form>
<a href="login.php">Already have an account? Login</a>
</body>
</html>
3. Login (login.php)
php
CopyEdit
<?php
session_start();
include 'config/db.php';

if ($_SERVER['REQUEST_METHOD'] === 'POST') {


$username = trim($_POST['username']);
$password = $_POST['password'];

$stmt = $conn->prepare("SELECT id, password FROM users WHERE username = ?");


$stmt->bind_param("s", $username);
$stmt->execute();
$stmt->store_result();

if ($stmt->num_rows == 1) {
$stmt->bind_result($id, $hashed_password);
$stmt->fetch();

if (password_verify($password, $hashed_password)) {
$_SESSION['user_id'] = $id;
$_SESSION['username'] = $username;
header("Location: index.php");
exit();
} else {
$error = "Incorrect password.";
}
} else {
$error = "User not found.";
}
}
?>

<!DOCTYPE html>
<html>
<head><title>Login</title></head>
<body>
<h2>Login</h2>
<?php if (!empty($error)) echo "<p style='color:red;'>$error</p>"; ?>
<form method="POST" action="">
<input type="text" name="username" placeholder="Username" required><br><br>
<input type="password" name="password" placeholder="Password"
required><br><br>
<button type="submit">Login</button>
</form>
<a href="register.php">Don't have an account? Register</a>
</body>
</html>
4. Logout (logout.php)
php
CopyEdit
<?php
session_start();
session_destroy();
header("Location: login.php");
exit();

5. Protecting Pages
At the top of pages like index.php, add_expense.php, delete_expense.php add:

php
CopyEdit
session_start();
if (!isset($_SESSION['user_id'])) {
header("Location: login.php");
exit();
}

6. Modify Expense Queries


When fetching or adding expenses, use the logged-in user's ID:

php
CopyEdit
$user_id = $_SESSION['user_id'];

// Fetch expenses for user only


$stmt = $conn->prepare("SELECT * FROM expenses WHERE user_id = ? ORDER BY date
DESC");
$stmt->bind_param("i", $user_id);
$stmt->execute();
$result = $stmt->get_result();

Similarly, insert new expenses with user_id:

php
CopyEdit
$stmt = $conn->prepare("INSERT INTO expenses (user_id, title, amount, date)
VALUES (?, ?, ?, ?)");
$stmt->bind_param("isds", $user_id, $title, $amount, $date);
2. Expense Categories
Organize expenses into categories like Food, Bills, Transport, etc.

Add to expenses table:

sql
CopyEdit
ALTER TABLE expenses ADD COLUMN category VARCHAR(100);

UI Enhancement:

Dropdown in form to choose a category

Filter by category on home page

Database Changes
Add a category column to your expenses table:

sql
CopyEdit
ALTER TABLE expenses ADD COLUMN category VARCHAR(100) NOT NULL DEFAULT
'General';

Or create a separate categories table if you want predefined categories:

sql
CopyEdit
CREATE TABLE categories (
id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(100) NOT NULL UNIQUE
);

-- Sample categories insert


INSERT INTO categories (name) VALUES ('Food'), ('Transport'), ('Bills'),
('Entertainment'), ('Others');

Then add a category_id column to expenses:

sql
CopyEdit
ALTER TABLE expenses ADD COLUMN category_id INT DEFAULT NULL;
ALTER TABLE expenses
ADD FOREIGN KEY (category_id) REFERENCES categories(id) ON DELETE SET NULL;
2. Update the Expense Form (index.php or add_expense.php)
If using a simple text input category:
html
CopyEdit
<input type="text" name="category" placeholder="Category (e.g., Food)"
required>

If using a categories table, load options dynamically:


php
CopyEdit
<?php
include 'config/db.php';

$categories_result = $conn->query("SELECT id, name FROM categories ORDER BY


name ASC");
?>

<select name="category_id" required>


<option value="">Select Category</option>
<?php while($cat = $categories_result->fetch_assoc()): ?>
<option value="<?= $cat['id'] ?>"><?=
htmlspecialchars($cat['name']) ?></option>
<?php endwhile; ?>
</select>

3. Update Add Expense Logic (add_expense.php)


For text category:
php
CopyEdit
$category = trim($_POST['category']);
$stmt = $conn->prepare("INSERT INTO expenses (title, amount, date, category)
VALUES (?, ?, ?, ?)");
$stmt->bind_param("sdss", $title, $amount, $date, $category);

For category_id:
php
CopyEdit
$category_id = intval($_POST['category_id']);
$stmt = $conn->prepare("INSERT INTO expenses (title, amount, date, category_id)
VALUES (?, ?, ?, ?)");
$stmt->bind_param("sdsi", $title, $amount, $date, $category_id);
4. Display Categories on Home Page (index.php)
Add a column in your expenses table:

php
CopyEdit
<?php
// If using category text
echo "<td>" . htmlspecialchars($row['category']) . "</td>";

// If using categories table and JOIN


$sql = "SELECT e.*, c.name AS category_name FROM expenses e LEFT JOIN
categories c ON e.category_i

3. Monthly & Weekly Reports


Summarize spending habits

Features:

 Show total spent this month


 Generate simple bar/pie charts using Chart.js
 Export to CSV or PDF

4. Mobile-Responsive Design
Improve usability on phones

 Use CSS Flexbox/Grid or frameworks like Bootstrap


 Optimize form/table layout for small screens

5. Receipt Upload
Upload photo/PDF of expense proof

Enhancements:

 Add file upload in add_expense.php


 Store files in /uploads folder
 Save file path in DB
sql
CopyEdit
ALTER TABLE expenses ADD COLUMN receipt_path VARCHAR(255);

6. Search & Filter


Easily find past expenses

Features:

 Search by title/date/category
 Filter by date range or amount

7. Localization & Currency Support


Support different currencies and languages

Enhancements:

 Use session or DB to save user's preferred currency


 Add multilingual support via language files

8. Recurring Expenses
Automatically add monthly bills like rent

Features:

 Mark expense as recurring


 Use a cron job or backend script to duplicate it monthly

How to Import

You can run this script using:

 phpMyAdmin → SQL tab


 MySQL CLI:

sh
CopyEdit
mysql -u root -p < schema.sql
6. style.css (Optional)
css
CopyEdit
body {
font-family: Arial;
padding: 20px;
}

form input, form button {


margin: 5px;
padding: 8px;
}

table {
width: 100%;
border-collapse: collapse;
margin-top: 20px;
}

table, th, td {
border: 1px solid #aaa;
padding: 10px;
text-align: left;
}

h2, h3 {
color: #333;
}

style.css

css
CopyEdit
/* General styles */
body {
font-family: Arial, sans-serif;
margin: 30px;
background-color: #f9f9f9;
color: #333;
}

h2, h3 {
text-align: center;
color: #2c3e50;
}
form {
max-width: 600px;
margin: 20px auto;
padding: 15px;
background: #ffffff;
border: 1px solid #ddd;
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

form input[type="text"],
form input[type="number"],
form input[type="date"],
form button {
display: block;
width: 95%;
padding: 10px;
margin: 10px auto;
border: 1px solid #ccc;
border-radius: 5px;
font-size: 16px;
}

form button {
background-color: #3498db;
color: #fff;
border: none;
cursor: pointer;
}

form button:hover {
background-color: #2980b9;
}

/* Table styles */
table {
width: 90%;
margin: 20px auto;
border-collapse: collapse;
background-color: #fff;
border: 1px solid #ddd;
}

table th,
table td {
padding: 12px 15px;
text-align: left;
border-bottom: 1px solid #eee;
}

table th {
background-color: #f0f0f0;
}

table tr:hover {
background-color: #f9f9f9;
}

/* Delete link style */


a {
color: #e74c3c;
text-decoration: none;
font-weight: bold;
}

a:hover {
text-decoration: underline;
}

Where to Place It
 Save it in:
expense-tracker/assets/css/style.css
 Include it in your HTML:

html
CopyEdit
<link rel="stylesheet" href="assets/css/style.css">

You might also like