Download as pdf or txt
Download as pdf or txt
You are on page 1of 84

A Project Report on

“ONLINE PERIODIC CENSUS”

Submitted to the Bangalore University in partial fulfillment of

the requirement for the award of the degree in

Bachelor of Computer Applications

Submitted by

MUHSINA MOIDEEN V M USN: 14VFSB7032

Under the guidance of

Mr. S SATHYA FRANKLIN

Ring Road, Marathalli, Bangalore – 560 103.


DECLARATION

I hereby declare that the project report entitled “ONLINE PERIODIC CENSUS” was
prepared by me during the year 2016-2017 and was submitted to the Bangalore University, in
partial fulfillment of the requirements for the award of the Degree in Bachelor of Computer
Applications. I also declare that this project report is original and genuine and it has not been
submitted to any of the University for the award of any degree, diploma or other similar titles
or purposes.

Date: 21/04/2017 Signature of the Candidate

Place: New Horizon College MUHSINA MOIDEEN V.M

[USN: 14VFSB70132]
Page |2

CERTIFICATE

This is to certify that the project report entitled “ONLINE PERIODIC CENSUS” Submitted
by MUHSINA MOIDDEN V.M [14VFSB7032]. This report is an outcome of genuine
project work and has been submitted in partial fulfillment for the award of the Degree of
Bachelor of Computer Applications, awarded by Bangalore University, during the academic
year 2016-17.

Project Guide Head of the Department


Mr. S Sathya Franklin Mr. Nagaraju K

Signature of the Examiners


1. ________________
2. ________________

ONLINE CENSUS
Page |3

ACKNOWLEDGEMENT

We express our deep sincere thanks to Dr. Mohan Maghnani, the Chairman of New Horizon
Educational Institutions for providing the platform and infrastructure to do this project. This
project would not have been possible without the help and co-operation of many. At the outset, I
wish to record my profound gratitude to our principal Dr. R. Bodhisatvan

We are extremely thankful to Mr. Nagaraju K, Head of the Department, BCA for his unending
support and encouragement during the development of this project.

We would like to acknowledge the interest and the support extended by our project guide Mr. S
SATHYA FRANKLIN, Asst. Professor, Department of BCA, to make this project
implementation successful.

Above all we would thank God for the blessings and my parents also for their valuable
suggestion and support in my project report

Finally, we extend our deep sense of gratitude to all those who made this project come alive and
encouraged and guided us from the start to finish.

ONLINE CENSUS
Page |4

SYNOPOSIS

TITLE: Online Periodic Census

The periodic census with graphical representation is an online based application that is been
developed to ease the work of manual census.

The proposed census measurement system eliminates the process of personally visiting each
houses and collecting data for census report. User should register into the website to add their
personal details by providing official documents.

Officer will be assigned a particular region, all the data filled by the user of that area will be sent
to that area’s officers. Officer can view documents of a particular member and check their
details. If officer finds any error or correction, they can send a request to user with a note about
the error and user can re-correct the area and send the request back to officer. After officer’s
approval, data will be stored in final table. Admin will be able to get reports.

ONLINE CENSUS
Page |5

INDEX

CHAPTERS PAGE NO
CHAPTER:1 INTRODUCTION TO THE PROJECT
1.1. PROBLEM STATEMENT 7
1.1.1. MODULE DESCRIPTION 8
CHAPTER:2 SYSTEM ANALYSIS
2.1. REQUIREMENTS SPECIFICATION 9
2.2. HARDWARE REQUIREMENTS 10
2.3. SOFTWARE REQUIRMENTS 10
2.3.1. INTRODUCTION TO HTML 13
2.3.2. INTRODUCTION TO CSS 14
2.3.3. INTRODUCTION TO PHP 15
2.3.4. INTRODUCTION TO MYSQL 16
2.3.5. INTRODUCTION TO XAMPP 17
2.4. PROPOSED SYSTEM 19
CHAPTER:3 SYSTEM DESIGN
3.1. TABLE STRUCTURE 21
3.2. ER DIAGRAM 22
CHAPTER:4 CODING AND DEVELOPMENT
4.1. SOURCE CODE 26
CHAPTER:5 TESTING AND IMPLEMENTATION
5.1. INTRODUCTION TO TESTING 66
5.2. TYPES OF TESTING USED 67
CHAPTER:6 CONCLUSION
6.1. FUTURE ENHANSMENT 72

ONLINE CENSUS
Page |6

APPENDICES
SCREENSHOTS / FORM DESIGNS 74
BIBLIOGRAPHY 83

ONLINE CENSUS
Page |7

INTRODUCTION

1.1 PROBLEM STATEMENT:


The main aim of developing this application is to ease the work of manual census. This web
based application will help the respondents to complete the census via internet. By being
online means it is available and free of charges to any. The traditional method involves
many difficulties. Now-a-days in this fast world of technology it is very important to
complete a work in a speedy manner. Using this application user can register into the system
can fill their details like Name, Address, Education and Qualification, DOB, Aadhaar
number etc. The proposed census measurement system eliminates the process of personally
visiting each houses and collecting data for census report.

Modules

1. Admin
1.1 Add Officer
1.2 Remove Officer
2. Officer
2.1 Approve
2.2 Users
3. Report
3.1 Birth rate
3.2 Literacy rate

1.1.1 Modules Description


 ADMIN: Admin will add officer for the particular area and remove the officer
from the particular place.
1.1 Add Officer: Admin will add officer by filling the Name, Address,
Email, Phone etc.

ONLINE CENSUS
Page |8

1.2 Remove Officer: Admin will remove the officer from particular
area.

 OFFICER: officer will view the details filled by the user and approver if all the
given details is true and reject if it is not true.
2.1 Approve: Approve the details given by the user.
2.2 Reject: Reject if the given details is not true.

 USER: user will register the details like Name, DOB, Area, City, Phone,
Aadhar, Education and Occupation, Gender, State, Address etc.

 REPORTS: This module enables the Admin to manage various reports


calculated according to the data provided by the users and approved by the
officers.
3.1 Birth rate- The number of live births per thousand of population
per year.
3.2 Literacy rate- Total percentage of the population of an area at a
particular time aged 7 years or above who can read and write.

ONLINE CENSUS
Page |9

SYSTEM ANALYSIS

Analysis can be defined as breaking up of any whole to find out their nature, function etc. It
defines design as to make preliminary sketches of; to sketch a pattern or outline for plan. To plan
and carry out especially by artistic arrangement or in a skillful wall.

System analysis and design can be characterized as a set of techniques and processes, a
community of interests, a culture and an intellectual orientation. The various tasks in the system
analysis include the following.

 Understanding application.
 Planning.
 Scheduling.
 Developing candidate solution.
 Performing trade studies.
 Performing cost benefit analysis.
 Recommending alternative solutions.
 Selling of the system.
 Supervising, installing and maintaining the system.

2.1.REQUIREMENT AND SPECIFICATIONS:

DEFINITION:

A software requirements specification (SRS) is a description of a software system to be


developed. It lays out functional and non-functional requirements, and may include a set of use
cases that describe user interactions that the software must provide.

Software requirements specification establishes the basis for an agreement between customers
and contractors or suppliers (in market-driven projects, these roles may be played by the
marketing and development divisions) on what the software product is to do as well as what it is
ONLINE CENSUS
P a g e | 10

not expected to do. Software requirements specification permits a rigorous assessment of


requirements before design can begin and reduces later redesign. It should also provide a realistic
basis for estimating product costs, risks, and schedules. Used appropriately, software
requirements specifications can help prevent software project failure.

The software requirements specification document enlists enough and necessary requirements
that are required for the project development. To derive the requirements we need to have clear
and thorough understanding of the products to be developed or being developed. This is achieved
and refined with detailed and continuous communications with the project team and customer till
the completion of the software.

The SRS may be one of a contract deliverable Data or have other forms of organizationally-
mandated content.

The Software Requirements Specification (SRS) is a communication tool between stakeholders


and software designers. The specific goals of the SRS are:

 Facilitating reviews
 Describing the scope of work
 Providing a reference to software designers (i.e. navigation aids, document structure)
 Providing a framework for testing primary and secondary use cases
 Including features to customer requirements
 Providing a platform for ongoing refinement (via incomplete specs or questions)

An example organization of an SRS is as follows:

 Purpose
 Definitions
 System overview
 References
 Overall description
 Product perspective
 System Interfaces

ONLINE CENSUS
P a g e | 11

 User interfaces

 Hardware interfaces
 Software interfaces
 Communication Interfaces
 Memory Constraints

 Design constraints
 Operations
 Site Adaptation Requirements
 Product functions
 User characteristics
 Constraints, assumptions and dependencies
 Specific requirements
 External interface requirements
 Functional requirements
 Performance requirements
 Logical database requirement
 Software System attributes
 Reliability
 Availability
 Security
 Maintainability
 Portability

ONLINE CENSUS
P a g e | 12

SYSTEM REQUIREMENTS

2.2 Hardware Requirement Specifications:


Processor : Intel Core Duo 2.0 GHz or more

RAM : 1 GB or More

Hard disk : 80GB or more

Monitor : 15” CRT, or LCD monitor

Keyboard : Normal or Multimedia

Mouse : Compatible mouse

2.3 Software Requirement Specifications:


Front End : PHP

Back End : MySQL Server

Operation System : Windows 7 and above

Sever : XAMPP

Tool for IDE : Sublime Text

ONLINE CENSUS
P a g e | 13

2.3.1 Introduction to HTML


HTML or Hyper Text Markup Language is the standard markup language used to create web
pages.

HTML was created in 1991 by Tim Berners-Lee at CERN in Switzerland. It was designed to
allow scientists to display and share their research.

HTML is written in the form of HTML elements consisting of tags enclosed in angle brackets
(like <html>). HTML tags most commonly come in pairs like <h1> and </h1>, although some
tags represent empty elements and so are unpaired, for example <img>. The first tag in a pair is
the start tag, and the second tag is the end tag (they are also called opening tags and closing
tags).

The purpose of a web browser is to read HTML documents and compose them into visible or
audible web pages. The browser does not display the HTML tags, but uses the tags to interpret
the content of the page. HTML describes the structure of a website semantically along with cues
for presentation, making it a markup language rather than a programming language.

HTML elements form the building blocks of all websites. HTML allows images and objects to
be embedded and can be used to create interactive forms. It provides a means to create structured
documents by denoting structural semantics for text such as headings, paragraphs, lists, links,
quotes and other items. It can embed scripts written in languages such as Java Script which affect
the behavior of HTML web pages.

HTML is descriptive markup language. Library of various markup languages is defined in


various browsers. (4)

ONLINE CENSUS
P a g e | 14

2.3.2 Introduction To CSS

CSS tutorial or CSS 3 tutorial provides basic and advanced concepts of CSS technology. Our
CSS tutorial is developed for beginners and professionals. The major points of CSS are given
below:

• CSS stands for Cascading Style Sheet.

• CSS is used to design HTML tags.

• CSS is a widely-used language on the web.

• HTML, CSS and JavaScript are used for web designing. It helps the web designers to
apply style on HTML tags.

Cascading Style Sheets (CSS) is a style sheet language used for describing the look and
formatting of a document written in a markup language. While most often used to style web
pages and user interfaces written in HTML and XHTML, the language can be applied to any
kind of XML document, including plain XML, SVG and XUL. CSS is a cornerstone
specification of the web and almost all web pages use CSS style sheets to describe their
presentation.

CSS is designed primarily to enable the separation of document content from document
presentation, including elements such as the layout, colors, and fonts. This separation can
improve content accessibility, provide more flexibility and control in the specification of
presentation characteristics, enable multiple pages to share formatting, and reduce complexity
and repetition in the structural content (such as by allowing for table less web design).

CSS can also allow the same markup page to be presented in different styles for different
rendering methods, such as on-screen, in print, by voice (when read out by a speech-based
browser or screen reader) and on Braille-based, tactile devices. It can also be used to allow the
web page to display differently depending on the screen size or device on which it is being
viewed. While the author of a document typically links that document to a CSS file, readers can
use a different style sheet, perhaps one on their own computer, to override the one the author has
specified.

ONLINE CENSUS
P a g e | 15

With plain HTML, you define the colors and sizes of text and tables throughout your pages. If
you want to change a certain element you will therefore have to work your way through the
document and change it. With CSS, you define the colors and sizes in "styles". Then as you
write your documents you refer to the styles. Therefore: if you change a certain style it will
change the look of your entire site. Another big advantage is that CSS offers much more
detailed attributes than plain HTML for defining the look and feel of your site.

2.3.3 Introduction TO PHP


PHP is now officially known as “PHP: Hypertext Preprocessor”. It is a server-side scripting
language usually written in an HTML context. Unlike an ordinary HTML page, a PHP script is
not sent directly to a client by the server; instead, it is parsed by the PHP binary or module,
which is server-side installed. HTML elements in the script are left alone, but PHP code is
interpreted and executed. PHP code in a script can query databases, create images, read and write
files, talk to remote servers – the possibilities is endless. The output from PHP code is combined
with the HTML in the script and the result sent to the user’s web-browser, therefore it can never
tell the user whether the web-server uses PHP or not, because the entire browser sees is HTML.

PHP’s support for Apache and MySQL further increases its popularity. Apache is now
the most-used web-server in the world, and PHP can be compiled as an Apache module. MySQL
is a powerful free SQL database, and PHP provides a comprehensive set of functions for working
with it. The combination of Apache, MySQL and PHP is all but unbeatable.

That doesn’t mean that PHP cannot work in other environments or with other tools. In
fact, PHP supports an extensive list of databases and web-servers. While in the mid-1990s it was
ok to build sites, even relatively large sites, with hundreds of individual hard-coded HTML
pages, today’s webmasters are making the most of the power of databases to manage their
content more effectively and to personalize their sites according to individual user preferences.

ONLINE CENSUS
P a g e | 16

2.3.4 Introduction to MYSQL


The database has become an integral part of almost every human's life. Without it, many things
we do would become very tedious, perhaps impossible tasks. Banks, universities, and libraries
are three examples of organizations that depend heavily on some sort of database system. On the
Internet, search engines, online shopping, and even the website naming convention would be
impossible without the use of a database. A database that is implemented and interfaced on a
computer is often termed a database server.
One of the fastest SQL (Structured Query Language) database servers currently on the
market is the MySQL server, developed by T.c.X. DataKonsultAB. MySQL, available for
download at www.mysql.com, offers the database programmer with an array of options and
capabilities rarely seen in other database servers. MySQL is free of charge for those wishing to
use it for private and commercial use. Those wishing to develop applications specifically using
MySQL should consult MySQL's licensing section, as there is charge for licensing the product.
These capabilities range across several topics, including the following:
a) Ability to handle an unlimited number of simultaneous users.
b) Capacity to handle 50,000,000+ records.
c) Very fast command execution, perhaps the fastest to be found on the market.
d)Easy and efficient user privilege system. However, perhaps the most interesting characteristic
of all is the fact that it's free. That's right, T.c.X offers MySQL as a free product to the general
public.

2.3.5 Introduction to XAMPP

XAMPP is a free and open sourcecross-platformserver solution package developed by Apache


Friends, consisting mainly of the Apache HTTP Server, MariaDBdatabase, and interpreters for
scripts written in the PHP and Perl programming. XAMPP stands for Cross-Platform (X),
Apache (A), MariaDB (M), PHP (P) and Perl (P). It is a simple, lightweight Apache distribution
that makes it extremely easy for developers to create a local web server for testing and
deployment purposes. Everything needed to set up a web server – server application (Apache),
database (MariaDB), and scripting language (PHP) – is included in an extractable file. XAMPP

ONLINE CENSUS
P a g e | 17

is also cross-platform, which means it works equally well on Linux, Mac and Windows. Since
most actual web server deployments use the same components as XAMPP, it makes transitioning
from a local test server to a live server extremely easy as well.

The term XAMPP is an apparent acronym. However, there is no official acronym expansion
specified on the Apache Friends website. Their homepage header reads “XAMPP Apache +
MariaDB + PHP + Perl”, indicating that this abbreviation is a recursive acronym.

The term can be unofficially broken down as follows:

Letter Meaning
X XAMPP or an ideographic letter X, meaning cross-platform
A Apache or its expanded form, Apache HTTP Server
M MariaDB (formerly: MySQL)
P PHP
P Perl

MySQL was replaced with MariaDB on 2015-10-19 and beginning with XAMPP versions 5.5.30
and 5.6.14, effectively altering the meaning of the acronym.

While both letters P are de facto interchangeable, convention used at the Apache Friends website
indicates that the first letter P is short for PHP and the latter letter P is short for Perl.

phpMyAdmin is a free and open source tool written in PHP intended to handle the
administration of MySQL or MariaDB with the use of a web browser. It can perform various
tasks such as creating, modifying or deleting databases, tables, fields or rows; executing SQL
statements; or managing users and permissions.

ONLINE CENSUS
P a g e | 18

This is a screenshot of phpMyAdmin that can be used in xampp server.

Features provided by the program include:

 Web interface
 MySQL and MariaDB database management
 Import data from CSV and SQL
 Administering multiple servers
 Creating PDF graphics of the database layout
 Creating complex queries using Query-by-Example (QBE)
 Searching globally in a database or a subset of it
 Live charts to monitor MySQL server activity like connections, processes, CPU/Memory
usage, etc.
 Working with different operating systems.

The software, which is currently available in 78 languages, is maintained by The phpMyAdmin


Project.(1)

ONLINE CENSUS
P a g e | 19

PROPOSED SYSTEM
When census is taken manually, an authorized officer visits every single house and collects the
complete information. Those system have dual work of collecting the data on paper and then
feeding it in computer. This also takes a vast amount of man power into it. The information is to
change as it is taken as a written work on a paper.

The solution for the above mentioned for drawbacks is finding a device which has comparatively
well equipped device (similar to laptop/ PC) with network accessibility, consumes comparatively
less power, easy to carry and able to work even while walking. The finest solution out is PDA
(Personal Digital Assistant) and mobile phone.

PDA, also known as a palmtop computer, is a mobile device which functions as a personal
Information Manager and connects to internet. The PDA has an electronic visual display
enabling them to be used as mobile phones, portable media players. Mobile phones are for those
who do not have a PDA.

ONLINE CENSUS
P a g e | 20

SYSTEM DESIGN

ONLINE CENSUS
P a g e | 21

3.1 TABLE DESCRIPTION


Admin
Sl. Field Name Variable type/size Constraints Description
No.
1. Admin ID Varchar(10) Primary key Unique ID to identify the Admin
2. Name Varchar(30) Not null Name of Admin
3. Password Varchar(30) Not null Password of Admin

Officer
Sl. Field Name Variable type/size Constraints Description
No.
1. Officer ID Varchar(10) Primary key Unique ID given for Officer
2. Password Varchar(30) Not null Password given for the Officer
3. Name Varchar(30) Not null Name of the Officer
4. Email Varchar(30) Not null Unique Email ID of the Officer
5. Phone Integer(12) Unique Phone number of Officer
6. State Varchar(30) Not null The state to which officer belongs to.
7. City Varchar(10) Not null Which City Officer belongs to.

Users
Sl. Field Name Variable type/size Constraints Description
No.
1. User ID Varchar(10) Primary key Unique ID for User
2. Password Varchar(30) Not null Password for the User
3. Name Varchar(30) Not null Name of the User
4. DOB Date Not null Date of Birth of User
5. Gender Varchar(10) Not null Gender of User
6. Email ID Varchar(30) Unique Unique Email ID of User
7. Phone Number Integer(12) Unique Phone number of the User
8. Education Varchar(30) Not null Education of the User
9. Occupation Varchar(30) Not null Occupation of the User

ONLINE CENSUS
P a g e | 22

10. Address Varchar(30) Not null Address of the User


11. Area Varchar(30) Not null Area to which User belongs
to
12. City Varchar(30) Not null City the User belongs to
13. State Varchar(30) Not null State to which User belongs
to
14. Aadhar no. Integer(12) Unique Unique identity given by the
government
15. Status Varchar(20) Not Null Stores status of registered
user (Pending or Approved)

3.2E-R Diagrams

INTRODUCTION TO ER DIAGRAM

The entity-relationship data model is based on a perception of a real world that consists of a
collection of basic objects called entities and of relationships among these objects. An entity is
an “object” in the real world that is distinguishable from other objects. For e.g. each customer is
an entity and rooms can be considered to be entities. Entities are described by a set of attributes.
For e.g. the attributes Room no. and Room type describes a Room in a hotel. The set of all
entities of the same type and the set of all relationships of the same type are termed as an entity
set and relationship set respectively.

The logical structure of a database can be expressed graphically by an E- R diagram


consists of the following major components:

 Entity
An entity is an “object” in the real world that is distinguishable from all other objects. An entity
set is a set of entities of the same type that share the same attributes.

 Weak Entity

An entity set that may not have sufficient attributes to form a primary key is termed as a weak
entity set.

 Attribute

Attributes are descriptive properties possessed by each member of an entity set.

ONLINE CENSUS
P a g e | 23

 Key attribute

A key attribute is the unique, distinguishing characteristic of the entity. For example, Guest ID
might be the guest’s key attribute.

 Multivalued attribute

In an instance where an attribute has a set of values for a specific entity is called multivalued
attribute.

 Derived attribute

In these attributes the value can be derived from the values of other related attributes.

 Relationships

A relationship is an association among several entities.

Relationship

For e.g., we can define a relationship that associates customer Jon with Room 142.This
relationship specifies that Jon is a customer with Room No.142.

 Recursive Relationship

In some cases, entities can be self-linked. For example, Employees can supervise other
employees in a hotel.

ONLINE CENSUS
P a g e | 24

Admin

 Admin Id
Manage  Name
s  Password

Officer

 Officer Id
 password
 Name Approve
 Email
 phone
 city
 state

Users

 Name
 DOB
 Gender
 Email
View  Phone
 Education
 Occupation
ONLINE CENSUS
 Address
 Area
 City
P a g e | 25

CODING AND DEVELOPMENT

ONLINE CENSUS
P a g e | 26

4.1SOURCE CODE

Index.php

<!DOCTYPE html>

<html class="full" lang="en">

<head>

<script type="text/javascript" src="validate.js"></script>

<title>Welcome to CENSUS Webpage</title>

<link href="css/census.css" rel="stylesheet">

</head>

<body background="images/IndexBG.jpg" style="background-size: cover; ">

<center>

<div class="header">

<img src="images/Logo.jpg" style="width: 120px; margin-top: 20px;">

ONLINE CENSUS
P a g e | 27

<h1 style=" text-align: center; color: #474747; font-size: 28px; font-weight: 600; font-family:
">CENSUS</h1>

<div class="container">

<center>

<a href="Admin-Login.php" class="nav">ADMIN</a>|

<a href="Officer-Login.php" class="nav">OFFICER</a>|

<a href="Register.php" class="nav">REGISTER</a>|

<a href="Contact.php" class="nav">CONTACT</a>|

<a href="About.php" class="nav">ABOUT</a>

</center>

</div>

</div>

<div class="footer">

<center>

&copy 2017 CENSUS

</center>

</div>

</center>

ONLINE CENSUS
P a g e | 28

</body>

</html>

Admin login.php

<?php

session_start();

error_reporting(1);

include_once('connection.php');

if(isset($_POST['signIn']))

if($_POST['id']=="" || $_POST['pwd']=="")

$err="fill your id and passwrod first";

else

$d=mysqli_query($con,"SELECT * FROM admin where user_name='{$_POST['id']}'");

$row=mysqli_fetch_object($d);

$fid=$row->user_name;

$fpass=$row->password;

if($fid==$_POST['id'] && $fpass==$_POST['pwd'])

ONLINE CENSUS
P a g e | 29

$_SESSION['sid']=$_POST['id'];

//header('location:HomePage.php');

echo "<script>window.location='HomePage.php'</script>";

else

echo "<script>alert('invalid id or password')</script>";

$err="invalid id or pass";

?>

<html>

<head>

<meta charset="utf-8">

<title>Census</title>

<style type="text/css">

ONLINE CENSUS
P a g e | 30

body

background-color:white;

font-family: 'Open Sans', Arial, Helvetica, sans-serif;

line-height: 1.5em;

a { text-decoration: none;

color: #5592f4;

a:hover {

text-decoration: underline;

cursor: pointer;

color: #1568ed;

h1 {

font-size: 24px;

color: #77A131;

ONLINE CENSUS
P a g e | 31

margin: 10px;

h1, p {

margin: 20px;

strong {

font-weight: bold;

#login {

margin: 50px auto;

width: 300px;

.btn {

background-color: blue;

border-radius: 10px;

-moz-border-radius: 10px;

-webkit-border-radius: 10px;

ONLINE CENSUS
P a g e | 32

color: white;

display: block;

font-size: 18px;

height: 50px;

width: 200px;

line-height: 50px;

margin: 0px;

text-align: center;

</style>

</head>

<body>

<center>

<div id="login">

<img src="Logo.jpg" id="logo" width="50%"><br>

<h1><strong>CENSUS</strong></h1>

<form action="AdminLogin.php">

<p><input type="submit" value="Admin Login" class="btn"></p>

ONLINE CENSUS
P a g e | 33

</form><form action="officerlogin.html">

<p><input type="submit" value="Officer Login" class="btn"></p></form>

<form action="userlogin.html">

<p><input type="submit" value="User Login" class="btn"></p></form>

<p><a href="#">New User? Register here</a></p>

<p><a href="index.html">HOME</a></p>

</div>

</center>

<!-- end login -->

</body>

</html>

Admin home.php

<!DOCTYPE html>

<head>

<title>Admin Home | CENSUS</title>

<link href="css/census.css" rel="stylesheet">

</head>

<body background="">

ONLINE CENSUS
P a g e | 34

<div class="header" style="padding: 25px; height: 100px;">

<img src="images/Logo.jpg" style="width: 120px; float: left;">

<div style=" text-align: left; color: #474747; float: left; margin-left: 30px; margin-top:
15px;">

<font style="font-size: 35px; font-weight: 600;">CENSUS</font><br>

<font style="font-size: 25px; font-weight: normal;">ADMIN HOME</font><br>

</div>

</div>

<div class="sidenav">

<ul>

<li><a href="Add-Officer.php" class="side-nav-menu">ADD OFFICER</a></li>

<li><a href="Remove-Officer.php" class="side-nav-menu">REMOVE


OFFICER</a></li>

<li><a href="Reports.php" class="side-nav-menu">REPORT</a></li>

<hr>

<li><a href="Index.php" class="side-nav-menu">LOG OUT</a></li>

</ul>>

</div>

</body>

ONLINE CENSUS
P a g e | 35

Add officer.php

<?php

include("connection.php");

session_start();

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

$OfficerId = mysqli_real_escape_string($con,$_POST['OfficerId']);

$OfficerPwd = mysqli_real_escape_string($con,$_POST['OfficerPwd']);

$Name = mysqli_real_escape_string($con,$_POST['Name']);

$Email = mysqli_real_escape_string($con,$_POST['Email']);

$Phone = mysqli_real_escape_string($con,$_POST['Phone']);

$City = mysqli_real_escape_string($con,$_POST['City']);

$State = mysqli_real_escape_string($con,$_POST['State']);

$sql = "INSERT INTO officer


VALUES('$OfficerId','$OfficerPwd','$Name','$Email','$Phone','$City','$State');";

if (mysqli_query($con,$sql)) {

ONLINE CENSUS
P a g e | 36

echo "<br><center>";

echo "Officer Added Successfully";

echo "<br><br>";

echo "</center><br><hr><br>";

else {

echo "Error: ". $sql . "<br>" . mysqli_error($con);

?>

<html>

<head>

<title>Add Officer | CENSUS Admin</title>

<style type="text/css">

body {

ONLINE CENSUS
P a g e | 37

font-family: verdana;

font-size: 18px;

margin: 20px 0;

.inp {

font-size: 16px;

font-weight: normal;

min-width: 250px;

height: 30px;

padding: 5px 10px;

input[type=number]::-webkit-inner-spin-button,

input[type=number]::-webkit-outer-spin-button {

-webkit-appearance: none;

margin: 0;

ONLINE CENSUS
P a g e | 38

.btn {

font-size: 18px;

font-weight: bold;

width: 60%;

height: 40px;

padding: 8px;

background-color: #717171;

color: white;

border: none;

border-radius: 5px;

transition-duration: 0.5s;

.btn:hover {

background-color: white;

color: #717171;

ONLINE CENSUS
P a g e | 39

border: 1px solid #717171;

border-radius: 5px;

cursor: pointer;

.inpSmall {

font-size: 16px;

font-weight: normal;

height: 30px;

padding: 5px 10px;

max-width: 180px;

table {

background-color: rgba(255,255,255,0.8);

border-radius: 10px;

width: 35%;

padding: 10px 20px;

ONLINE CENSUS
P a g e | 40

.homeBtn {

width: 90px;

height: 30px;

padding: 10px;

position: fixed;

top: 10;

left: 10;

border: 2px solid white;

border-radius: 10px;

color: #717171;

background-color: white;

.homeBtn:hover {

border: 2px solid #717171;

ONLINE CENSUS
P a g e | 41

border-radius: 10px;

color: white;

background-color: #717171;

cursor: pointer;

</style>

<script type="text/javascript" src="validate.js"></script>

</head>

<body background="images/IndexBG.jpg" style="background-size: cover;">

<a href="Admin-Home.php">

<div class="homeBtn">

< Home

</div>

</a>

<form action="#" name="OfficerRegistration" onsubmit="return(validate());">

ONLINE CENSUS
P a g e | 42

<table cellpadding="2" width="50%" align="center" cellspacing="2">

<tr>

<td colspan="2" align="center"><h2><b>Add Officer</b></h2><br></td>

</tr>

<tr>

<td>Officer Id</td>

<td><input type="text" name="OfficerId" id="OfficerId" class="inp" required></td>

</tr>

<tr><br>

<td>Password</td>

<td><input type="text" name="OfficerPwd" id="OfficerPwd" class="inp" required></td>

</tr>

<tr>

<td>Name</td>

<td><input type="text" name="Name" id="Name" class="inp" required></td>

</tr>

<tr>

ONLINE CENSUS
P a g e | 43

<td>Email</td>

<td><input type="Email" id="Email" class="inp" required>

</td>

</tr>

<tr>

<td>Phone</td>

<td><input type="number" id="Phone" class="inpSmall" required>

</td>

</tr>

<tr>

<td>City</td>

<td><select name="City" class="inp" required>

<option value="BENGALURU">BENGALURE</option>

<option value="MYSORE">MYSORE</option>

</select>

</td>

</tr>

<tr>

ONLINE CENSUS
P a g e | 44

<td>State</td>

<td><select Name="State" class="inp" required>

<option value="KARNATAKA">KARNATAKA</option>

</select>

</td>

</tr>

<tr>

<td colspan="2" align="center"><br><input type="submit" value="Add Officer" class="btn">

</td>

</tr>

</table>

</tr>

</table>

</form>

</body>

</html>

ONLINE CENSUS
P a g e | 45

Officer login.php

<?php

include("connection.php");

session_start();

if($_SERVER["REQUEST_METHOD"] == "POST")

$username = mysqli_real_escape_string($con,$_POST['username']);

$password = mysqli_real_escape_string($con,$_POST['password']);

$result = mysqli_query($con,"SELECT * FROM officer where officer_id = '$username'


and password = '$password';");

$row = mysqli_fetch_array($result,MYSQLI_ASSOC);

$count = mysqli_num_rows($result);

if($count == 1) {

$_SESSION['sid']=$_POST['username'];

header("location: Officer-Home.php");

ONLINE CENSUS
P a g e | 46

else {

echo "<script>alert('Invalid Username or Password')</script>";

$err="invalid id or pass";

?>

<html>

<head>

<title>Officer Login | Census </title>

<script type="text/javascript">

</script>

<style type="text/css">

body {

ONLINE CENSUS
P a g e | 47

background-color: #CCCCCC;

font-family: Helvetica;

#info {

color: black;

width: 30%;

padding: 10%;

margin-top: 20px;

float: left;

text-align: center;

border-right: 3px solid rgba(71,71,71,0.25);

#login {

color: black;

margin: 10% 15% 10% 5%;

float: right;

ONLINE CENSUS
P a g e | 48

font-size: 20px;

.inp {

width: 300px;

height: 40px;

padding: 5px 10px;

margin-bottom: 20px;

margin-top: 5px;

font-size: 20px;

border: none;

border-radius: 5px;

color: #474747;

background-color: white;

.btn {

ONLINE CENSUS
P a g e | 49

width: 180px;

height: 45px;

padding: 5px 10px;

margin-bottom: 20px;

font-size: 20px;

border: 2px solid white;

border-radius: 5px;

color: white;

background-color: #474747;

transition-duration: 0.5s;

.btn:hover {

color: #474747;

background-color: white;

cursor: pointer;

ONLINE CENSUS
P a g e | 50

</style>

</head>

<body>

<div id="info">

<span style="color: #474747; font-size: 50px; font-weight: 600;">OFFICER LOGIN</span>

<br>

<img src="images/Login.png" style="width: 50%; opacity: 0.15; margin-top: 10px;">

</div>

<div id="login">

<form method="post">

<p>Username<br>

<input type="text" required name="username" id="username" class="inp"></p>

<p>Password<br>

<input type="password" required name="password" id="password"


class="inp"></p>

ONLINE CENSUS
P a g e | 51

<p><input type="submit" value="Login" name="login" class="btn"></p>

</form>

</div>

</body>

</html>

Officer home.php

<!DOCTYPE html>

<head>

<title>Officer Home | CENSUS</title>

<link href="css/census.css" rel="stylesheet">

</head>

<body background="">

<div class="header" style="padding: 25px; height: 100px;">

<img src="images/Logo.jpg" style="width: 120px; float: left;">

<div style=" text-align: left; color: #474747; float: left; margin-left: 30px; margin-top:
15px;">

<font style="font-size: 35px; font-weight: 600;">CENSUS</font><br>

ONLINE CENSUS
P a g e | 52

<font style="font-size: 25px; font-weight: normal;">OFFICER HOME</font><br>

</div>

</div>

<div class="sidenav">

<ul>

<li><a href="Approve.php" class="side-nav-menu">APPROVE</a></li>

<li><a href="Approved-Users.php" class="side-nav-menu">USERS</a></li>

<hr>

<li><a href="Index.php" class="side-nav-menu">LOG OUT</a></li>

</ul>>

</div>

</body>

Registration.php

<?php

include("connection.php");

session_start();

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

$Name = mysqli_real_escape_string($con,$_POST['Name']);

ONLINE CENSUS
P a g e | 53

$DOB = mysqli_real_escape_string($con,$_POST['DOB']);

$Gender = mysqli_real_escape_string($con,$_POST['Gender']);

$Email = mysqli_real_escape_string($con,$_POST['Email']);

$Phone = mysqli_real_escape_string($con,$_POST['Phone']);

$Education = mysqli_real_escape_string($con,$_POST['Education']);

$Occupation = mysqli_real_escape_string($con,$_POST['Occupation']);

$Address = mysqli_real_escape_string($con,$_POST['Address']);

$Area = mysqli_real_escape_string($con,$_POST['Area']);

$City = mysqli_real_escape_string($con,$_POST['City']);

$State = mysqli_real_escape_string($con,$_POST['State']);

$Pincode = mysqli_real_escape_string($con,$_POST['Pincode']);

$Aadhaar = mysqli_real_escape_string($con,$_POST['Aadhaar']);

$sql = "INSERT INTO users


VALUES('$Name','$DOB','$Gender','$Email','$Phone','$Education','$Occupation','$Address','$A
rea','$City','$State','$Pincode','$Aadhaar');";

if (mysqli_query($con,$sql)) {

echo "<br><center>";

echo "Registration Successfull";

echo "<br><br>";

ONLINE CENSUS
P a g e | 54

echo "</center><br><hr><br>";

else {

echo "Error: ". $sql . "<br>" . mysqli_error($con);

?>

<html>

<head>

<title>Registration</title>

<style type="text/css">

body {

font-family: verdana;

font-size: 18px;

margin: 20px 0;

ONLINE CENSUS
P a g e | 55

.homeBtn {

width: 90px;

height: 30px;

padding: 10px;

position: fixed;

top: 10;

left: 10;

border: 2px solid white;

border-radius: 10px;

color: #717171;

background-color: white;

.homeBtn:hover {

border: 2px solid #717171;

ONLINE CENSUS
P a g e | 56

border-radius: 10px;

color: white;

background-color: #717171;

cursor: pointer;

.inp {

font-size: 16px;

font-weight: normal;

min-width: 250px;

height: 30px;

padding: 5px 10px;

input[type=number]::-webkit-inner-spin-button,

input[type=number]::-webkit-outer-spin-button {

-webkit-appearance: none;

margin: 0;

ONLINE CENSUS
P a g e | 57

.btn {

font-size: 18px;

font-weight: bold;

width: 80%;

height: 40px;

padding: 8px;

background-color: #717171;

color: white;

border: none;

border-radius: 5px;

transition-duration: 0.5s;

.btn:hover {

background-color: white;

ONLINE CENSUS
P a g e | 58

color: #717171;

border: 1px solid #717171;

border-radius: 5px;

cursor: pointer;

.inpSmall {

font-size: 16px;

font-weight: normal;

height: 30px;

padding: 5px 10px;

max-width: 180px;

table {

background-color: rgba(255,255,255,0.8);

border-radius: 10px;

width: 35%;

padding: 10px 20px;

ONLINE CENSUS
P a g e | 59

</style>

<script type="text/javascript" src="validate.js"></script>

</head>

<body background="images/IndexBG.jpg" style="background-size: cover;">

<a href="Index.php">

<div class="homeBtn">

< Home

</div>

</a>

<form action="Register.php" name="RegForm" method="POST">

<table cellpadding="5" width="30%" bgcolor="white" align="center" cellspacing="2">

<tr>

<td colspan=2>

<center><font size=5 style="color: #474747;"><b>Registration Form</b></font></center><br>

ONLINE CENSUS
P a g e | 60

</td>

</tr>

<tr>

<td>Name</td>

<td><input type="text" name="Name" id="Name" class="inp" required></td>

</tr>

<tr>

<td>DOB</td>

<td><input type="date" name="DOB" id="DOB" class="inpSmall" required></td>

</tr>

<tr>

<td>Gender</td>

<td><input type="radio" name="Gender" value="male" size="10" required>Male

<input type="radio" name="Gender" value="Female" size="10" required>Female</td>

</tr>

<tr>

ONLINE CENSUS
P a g e | 61

<td>Email</td>

<td><input type="text" name="Email" id="Email" class="inp" required>

</td>

</tr>

<tr>

<td>Phone</td>

<td><input type="number" name="Phone" id="Phone" class="inp" required>

</td>

</tr>

<tr>

<td>Education</td>

<td><input type="text" name="Education" id="Education" class="inp" required>

</td>

</tr>

<tr>

<td>Occupation</td>

<td><input type="text" name="Occupation" id="Occupation" class="inp" required>

</td>

ONLINE CENSUS
P a g e | 62

</tr>

<tr>

<td>Address</td>

<td><input type="text" name="Address" id="Address" class="inp" required>

</td>

</tr>

<tr>

<td>Area</td>

<td><input type="text" name="Area" id="Area" class="inp" required>

</td>

</tr>

<tr>

<td>City</td>

<td><select name="City" class="inp" required>

<option value="BENGALURU">BENGALURU</option>

<option value="MYSORE">MYSORE</option>

</select>

</td>

ONLINE CENSUS
P a g e | 63

</tr>

<tr>

<td>State</td>

<td><select Name="State" class="inp" required>

<option value="KARNATAKA">KARNATAKA</option>

</select>

</td>

</tr>

<tr>

<td>Pincode</td>

<td><input type="number" name="Pincode" id="Pincode" class="inpSmall" required>

</td>

</tr>

<tr>

<td>Aadhaar no.</td>

<td><input type="number" name="Aadhaar" id="Aadhaar" class="inp" required>

</td>

</tr>

ONLINE CENSUS
P a g e | 64

<tr>

<td colspan="4" align="center"><input type="submit" value="Register" class="btn">

</td>

</tr>

</table>

</form>

</body>

</html>

ONLINE CENSUS
P a g e | 65

TESTING & IMPLEMENTATION

ONLINE CENSUS
P a g e | 66

5.1 INTRODUCTION: -

Once source code has been generated, software must be tested to uncover (and correct) as many
errors as possible before delivery to customer. Our goal is to design a series of test cases that
have a high likelihood of finding errors. To uncover the errors software techniques are used.
These techniques provide systematic guidance for designing test that

(1) Exercise the internal logic of software components, and

(2) Exercise the input and output domains of the program to uncover errors in program function,
behavior and performance.

STEPS:

Software is tested from two different perspectives:

(1) Internal program logic is exercised using ―White box ‖ test case design techniques.

(2) Software requirements are exercised using ―Black box ‖ test case design techniques. In both
cases, the intent is to find the maximum number of errors with the Minimum amount of effort
and time.

5.2 TYPES OF TESTING:

A strategy for software testing must accommodate low-level tests that are necessary to verify that
a small source code segment has been correctly implemented as well as high-level tests that
validate major system functions against customer requirements.

A strategy must provide guidance for the practitioner and a set of milestones for the manager.
Because the steps of the test strategy occur at a time when deadline pressure begins to rise,
progress must be measurable and problems must surface as early as possible. Following testing
techniques are well known and the same strategy is adopted during this project testing.(5)

ONLINE CENSUS
P a g e | 67

5.2.1 UNIT TESTING:

Unit testing focuses verification effort on the smallest unit of software design- the software
component or module. The unit test is white-box oriented. The unit testing implemented in every
module of student attendance management System by giving correct manual input to the system,
the data are stored in database and retrieved. If you want required module to access input or get
the output from the End user, any error will have accrued the time will provide handler to show
what type of error will accrued.

UNIT TEST CASE 1


Name of the test Login test
Item being tested Test for valid user
Sample input Enter wrong username and password
Expected output Username and password required
Actual output Same as expected output
Remark Successful

UNIT TEST CASE 2


Name of the test Generate record test
Item being tested Test for valid register number
Sample input Enter wrong register number
Expected output Invalid register number
Actual output Same as expected output
Remark Successful

ONLINE CENSUS
P a g e | 68

5.2.2 SYSTEM TESTING:

System testing is actually a series of different tests whose primary purpose is to fully exercise
the computer-based system. Below we have described the two types of testing which have been
taken for this project. It is to check all modules worked on input basis. If you want to change any
values or inputs will change all information. So, specified input is must. (5)

5.2.3 MODULE TESTING:

A module is sometimes used to describe a small subsystem composed of several “units.” For the
purposes of this article, the terms unit and module will be used interchangeably, referring to the
types of testing employed at the lowest level of system decomposition. The techniques described,
however, have greater applicability to testing outside of the unit or module. Testing directed to a
single module or unit is called module or unit testing. It consists of test planning, test data
development, test monitoring and execution, and evaluation of results. (5)

5.2.4 INTEGRATED TESTING:

The purpose of integration testing is to verify functional, performance, and reliability


requirements placed on major design items. These "design items", i.e., assemblages (or groups of
units), are exercised through their interfaces using black box testing, success and error cases
being simulated via appropriate parameter and data inputs. Software Integration Testing is
performed according to the Software Development Life Cycle (SDLC) after module and
functional tests. The cross-dependencies for software integration testing are: schedule for
integration testing, strategy and selection of the tools used for integration, define the
cyclomatical complexity of the software and software architecture, reusability of modules and
life-cycle / versioning management.(5)

ONLINE CENSUS
P a g e | 69

5.2.5 FUNCTIONAL TESTING:

Functional testing is a quality assurance(QA) process and a type of black-box testing that bases
its test cases on the specifications of the software component under test. Functions are tested by
feeding them input and examining the output, and internal program structure is rarely considered
(unlike white-box testing). Functional testing usually describes what the system does.

Functional testing does not imply that you are testing a function (method) of your module or
class. Functional testing tests a slice of functionality of the whole system. (5)

ONLINE CENSUS
P a g e | 70

CONCLUSION

ONLINE CENSUS
P a g e | 71

CONCLUTION:

With the theoretical inclination of our syllabus it becomes very essential to take the at most
advantage of any opportunity of gaining practical experience that comes along. The building
blocks of this Major Project ”ONLINE PERIODIC CENSUS” was one of these opportunities. It
gave us the requisite practical knowledge to supplement the already taught theoretical concepts
thus making us more competent as a computer engineer. The project from a personal point of
view also helped us in understanding the following aspects of project development:

• The planning that goes into implementing a project.


• The importance of proper planning and an organized methodology.
• The potential to work in alone in an environment without any support.

The project also provided us the opportunity of interacting with our teachers and to gain from
their best experience.

ONLINE CENSUS
P a g e | 72

6.1Future Recommendation
Not that we have done are application in a mode, we can extend this to wireless mode. PDA’s are
coming with higher technological specifications like GPRS facility etc. We can easily extend our
scope of the application to wireless mode which would be more useful. Now to get the
fingerprints and retinal authorization we are using Aadhar number, fingerprints and retinal
authorization can also be included when higher computational PDA’s are used.

ONLINE CENSUS
P a g e | 73

APPENDICIES

ONLINE CENSUS
P a g e | 74

Home Page:

Fig.1. Home page of Online Periodic Census

ONLINE CENSUS
P a g e | 75

Admin Login:

Fig.2. Page of Admin Login

ONLINE CENSUS
P a g e | 76

Admin Home

Fig.3. Page for Admin Home

ONLINE CENSUS
P a g e | 77

Add Officer

Fig.4. Page for Add Officer

ONLINE CENSUS
P a g e | 78

Remove Officer:

Fig.5. Page for Remove Officer

ONLINE CENSUS
P a g e | 79

Officer Login:

Fig.6. Page for Officer Login

ONLINE CENSUS
P a g e | 80

Officer Home:

Fig.7. Page for Officer Home

ONLINE CENSUS
P a g e | 81

Approve Users

Fig.8. Page for Approve Users

ONLINE CENSUS
P a g e | 82

Registration Form:

Fig.9. Page for Registration Form

Fig.10. User Registration Successful

ONLINE CENSUS
P a g e | 83

BIBLIOGRAPHY: -

WEBSITES REFERENCES

1. www.censusindia.gov.in
2. http://www.w3schools.com/php.net/
3. http://www.mysql.com

ONLINE CENSUS

You might also like