Professional Documents
Culture Documents
Project report submitted to the Bharathiar University Coimbatore in partial fulfillment of the
requirements for the award of the degree of
KEERTHANA.K.M
(Reg.No: 2122K0295)
MS P.SRIDEVI BCA,MCA,M.Phil.,
SATHYAMANGALAM-638 503
CERTIFICATE
This is to certify that the project report entitled, “ID CARD BARCODE READER”
submitted to the Bharathiar University in partial fulfillment of the requirements for the award of
the Degree of Bachelor of Science in Computer Science is a record of original project work
done by KEERTHANA.K.M (Reg. No: 2122K0295) during the period (2021- 2024) of her
study in the PG and Research Department of Computer Science at Kaamadhenu Arts and
Science College, Sathyamangalam under his supervision and guidance and that this project
report has not formed the basis for the award of any Degree / Diploma / Associate ship /
Fellowship or other similar title to any candidate of any University.
Countersigned
Date:
ACKNOWLEDGEMENT
The completion of this project was not just because of my ability but there are some well
wishers behind it. I am always thankful to them.
This project would not happen without the help of many people. I express my sincere
Thanks to our Chairman Thiru. R. PERUMALSAMY Avl., Kaamadhenu Arts and Science
College, Sathyamangalam for establishing my studies in this campus.
I INTRODUCTION 2
II SYSTEM STUDY 12
2.1.1 DRAWBACKS 12
2.2.1 FEATURES 13
V CONCLUSION 22
BIBLIOGRAPHY 23
APPENDICES 24
B.TABLE STRUCTURE 25
C.SAMPLE CODING 27
D.SAMPLE INPUT 36
E.SAMPLE OUTPUT 43
SYNOPSIS
The "ID CARD BARCODE READER" project is aimed at improving card security and
information storage efficiency by implementing a barcode scanning system for ID cards. The
primary focus is on the efficient management of essential details, including personal information
and roll numbers, and the project is designed to accommodate both administrative and user
access.
1
1. INTRODUCTION
A barcode reader, also known as a barcode scanner, is an optical scanning device capable
of reading printed barcodes and decoding the data contained within the barcode on a
computer.The innovative ID card barcode scanner system is crafted to enhance card security and
optimize information management processes.
A crucial admin module is featured in the project, providing administrators with the
capability to effectively manage and maintain attendance records for students and staff. This
module allows attendance records to be stored, default lists to be generated, and the status of
individual students and staff members to be monitored. The inclusion of this administrative
functionality significantly contributes to the overall effectiveness of the project.
The primary goal of the project is to assist faculty in easily identifying defaulters, while
the attendance history of all students and staff can be conveniently accessed by users. The project
is developed using PHP and MySQL technologies, ensuring a robust and secure system for the
efficient management of student and staff information.
In summary, the "ID CARD BARCODE READER" project aims to enhance card
security, streamline information storage, and improve attendance management through the
implementation of a barcode scanning system, catering to both administrative and user needs.
The project utilizes PHP and MySQL technologies to ensure a reliable and secure system.
2
1.2 SYSTEM SPECIFICATION
● RAM : 4 GB
PHP TOOL :
3
SOFTWARE FEATURES
Windows 10 Pro comes with built-in security features, including firewall and internet
protections to help safeguard against viruses, malware, and ransomware. Watch how Windows
10 Pro security features help her business. Find my device is a feature that can help you locate
your Windows 10 device if it's lost or stolen.
4
LANGUAGE SPECIFICATION
HTML
The HTML (HyperText Markup Language) is the standard markup language for
documents designed to be displayed in a web browser. It can be assisted by technologies such as
Cascading Style Sheets (CSS) and scripting language local storage and render the documents
into multimedias such as JavaScript. Web browsers receive HTML documents from a web server
or from web pages. HTML describes the structure of a web page semantically and originally
included cues for the appearance of the document.
HTML ATTRIBUTES
Most of the attributes of an element are name-value pairs, separated by = and written
within the start tag of an element after the element's name. The value may be enclosed in single
or double quotes, although values consisting of certain characters can be left unquoted in HTML
(but not XHTML).
Leaving attribute values unquoted is considered unsafe.In contrast. with name-value pair
attributes. There are some attributes that affect the element simply by their presence in the start
tag of the element,like the ismap attribute for the img element.
● The language for an element should be specified with a lang attribute rather than
the XHTML xml:lang attribute. XHTML uses XML's built-in language-defining
functionality attribute.
● Remove the XML namespace (xmlns=URI). HTML has no facilities for
namespaces. *Change the document type declaration from XHTML 1.0 to HTML
4.01. (see DTD section for further explanation).
5
● If present, remove the XML declaration. (Typically this is: <?xml version="1.0"
encoding="utf-8"?>).
● Ensure that the document's MIME type is set to text/html. For both HTML and
XHTML, this comes from the HTTP Content-Type header sent by the server. *
Change the XML empty-element syntax to an HTML style empty element (<br />
to <br>).
● The href attribute of <a> specifies the URL of the page the link goes to.
● The src attribute of <img> specifies the path to the image to be displayed.
● The width and height attributes of <img> provide size information for images.
● background (Deprecated. use CSS instead.) and bgcolor (Deprecated. use CSS
instead.) attributes for body (required element according to the W3C.) element. -
align (Deprecated. use CSS instead.) attribute on div, form, paragraph (p) and
heading (h1...h6) elements.
● align (Deprecated. use CSS instead.), noshade (Deprecated. use CSS instead.),
size (Deprecated. use CSS instead.) and width (Deprecated. use CSS instead.)
attributes on hr element.
● align (Deprecated. use CSS instead.), border, vspace and hspace attributes on img
and object (caution: the object element is only supported in Internet Explorer
(from the major browsers)) elements.
● align (Deprecated. use CSS instead.) attribute on legend and caption elements.
6
● alien (Depreent (use CSS instead) and bgcolor (Deprecated, wie CSS went on
table clement.
● nowrap (Obsolete), bgcolor (Deprecated, use CSS intend,), width, height on td
and th elements
● bgcolor (Deprecated, use CSS intend,) attribute on tr element.
● clear(Obsolete)attribute on br element.
● Compact attribute on dl, dir and menu elements
● type (Deprecated, use CSS instead,), compact (Deprecated, use CSS instead).
CSS
Cascading Style Sheets (CSS) is a style sheet language used for describing the
presentation of a document written in a markup language such as HIML,,1 CSS is a
commerstone technology of the World Wide Web, alongside HTML and JavaScript.2
CSS is designed to enable the separation of presentation and content, including layout,
colors, and fonts. This separation can improve content accessibility, provide more flexibility and
control in the specification of presentation characteristics, enable multiple web pages to share
formatting by specifying the relevant CSS in a separate .css file which reduces complexity and
repetition in the structural content as well as enabling the .css file to be cached to improve the
page load speed between the pages that share the file and its formatting.
SOFTWARE DESCRIPTION
PHP is the web development language written by and for web developers. PHP stands for
PHP: Hypertext Preprocessor. The product was originally named Personal Homepage Tools, and
many people still think that’s what the acronym stands for, but as it expanded in scope, a new
and more appropriate name was selected by community vote. PHP is currently in its sixth major
rewrite, called PHP6 or just plain PHP.
7
INTRODUCTION OF PHP
PHP & MYSQL are also both stable in the sense of feature stability. Their respective
development teams have thus far enjoyed a clear vision of their project and refused to be
distracted by every new fad and ill-through-out user demand that comes along. Much of the
effort goes into incremental performance improvements, communicating with more major
database, or adding better OOP support.
8
PHP STRENGTHS
PHP has much strength, including the following:
➢ Performance
➢ Scalability
➢ Interfaces to many different database system
➢ Build-in libraries for many common web tasks
➢ Low cost
➢ Ease of learning and use
➢ Strong object oriented support
➢ Portability
➢ Flexibility of development approach
➢ Availability of source code
USES OF PHP
FEATURES IN PHP
9
INTRODUCTION TO MYSQL
MYSQL is an open source, SQL relational database management system (RDBMS) that
is free for many uses (more detail on that later). In its history, MYSQL occasionally faced
opposition because of its lack of support for some core SQL constructs such as sub selects and
foreign keys. Ultimately, however, MYSQL found a broad, enthusiastic user base for its liberal
licensing terms, perky performance, and ease of use. Its acceptance was aided in part by the wide
variety of other technologies such as PHP, Perl, Python, and the like that have encouraged its use
through stable, well-documented modules and extensions. Databases are generally useful,
perhaps the most consistently useful family of software products (the “killer product”) in modern
computing. Like many competing products , both free and commercial, MYSQL isn’t a database
until it gives it some structure and form.
MYSQL STRENGTHS
MYSQL bas much strength, including the following
➢ High performance
➢ Low cost
➢ Ease of configuring and learning
➢ Portability
➢ Availability of source code
➢ Availability of support
1
Some of these are dependent on the other, for example not aU operating system run on
all hardware not all web servers support all programming languages.
The majority of PHP code can be written to be portable between operating systems and
web servers; there are some PHP functions that specifically relate to the file system that are
operating system dependent.
1
2. SYSTEM STUDY
It involves studying a procedure or business in order to identify its goals and purposes
and create systems and procedures that will achieve them in an efficient way. Use cases are a
widely used systems analysis modeling tool for identifying and expressing the functional
requirements of a system.
The existing system for the ID CARD BARCODE READER may include traditional
methods of ID card verification and information retrieval that are not encompassed by the
sophisticated barcode scanning system proposed in the project. Manual checking of ID cards,
basic visual verification, or other non-automated processes might be student or staff in the
current system, which the new system aims to enhance or replace for more efficient and secure
ID card management.
2.1.1 DRAWBACKS
■ The introduction of the new barcode scanning system may be met with
resistance, potentially resulting in the hindrance of the smooth transition
from conventional methods to the automated processes proposed by the
project.
1
2.2 PROPOSED SYSTEM
The proposed system for the project is aimed at revolutionizing card security and
information storage through the implementation of an advanced barcode scanning system for id
cards. It is designed for both administrative and user access, ensuring ease of use for faculty and
staff in retrieving attendance history and related information.
2.2.1 FEATURES
➢ Real-time Monitoring:
1
3. SYSTEM DESIGN AND DEVELOPMENT
The design of the system is essentially a blueprint or plan for a solution of the system to
be developed. A part of the system or subsystem of a whole of the system can itself be
considered a system with its own complements.
The file design phase represents the concluding stage that signifies the final system and
process of the "ID CARD BARCODE READER." During this design phase, the database tables,
input screen design, and output design are meticulously formulated. The database tables are
crafted with all requisite fields in a compact manner, ensuring an efficient structure for data
storage and retrieval.
All input screens within the system are deliberately designed to be user-friendly and
easily comprehensible, with standardized sizes implemented for consistency. Icons fashioned for
this system are characterized by their brevity, compactness, and self-explanatory nature. These
icons are sharp, enabling the system to be invoked seamlessly by novice users.
The reports generated within this system offer minute details, aiding managers in making
crucial decisions. The importance of software design is encapsulated in a single word:
"QUALITY." Design serves as the pivotal space where quality is nurtured in software
development, representing the exclusive conduit through which requirements are accurately
transformed into finalized software products or systems.
1
Forms for input design in this project are:
● Add details
● Viewing Users details
● Scan details
The objectives of the system take tangible form through its outputs, which can manifest
in diverse forms, encompassing reports, screen displays, printed forms, graphical elements, and
drawings. Fundamental requirements for outputs include accuracy, timeliness, and alignment
with the intended purpose, considering content, medium, and layout.
The term "database design" encompasses various facets, primarily and accurately
describing the logical design of the foundational data structures utilized for data storage. In the
relational model, these structures manifest as tables and views, while in an object database,
entities and relationships directly map to object classes and named relationships. However, the
scope of "database design" extends beyond base data structures to encompass the comprehensive
15
process of designing forms and queries integral to the overall database application within the
database management system.
The database design process involves a series of steps typically undertaken by the
database designer. These steps actively contribute to shaping the logical structure of the data,
ensuring efficiency, accuracy, and coherence in the overall functioning of the database system.
Today, an information system must not only meet current business needs but also be
flexible and capable of adapting to changing circumstances well into the future. Hence, a
prerequisite for introducing a new system is for management to identify and comprehend their
organization's mission and its associated information needs. Documenting this information helps
ensure a shared understanding and direction, providing a benchmark against which achievements
can be measured.
The initial step for the analyst is to comprehend the existing system by gathering
comprehensive information. This involves employing various methods such as studying current
procedures, observing the system's functioning, and conducting sampling and research to collect
the required data. These methods aid in acquiring a thorough understanding of the current
system's intricacies and nuances.
16
OFFICER MODULE
This module is responsible for storing and maintaining the details of both admin and user
information.
ADMIN MODULE
Within this module, the storage and management of student, staff, and scan details occur.
Add Details
This sub-module involves the creation of forms for inputting student and staff
information, allowing the storage of data such as Barcode ID, Name, Department, and Category
for each user.
USER MODULE
The primary function of this module is to showcase the scanning user details.
Scan Details
Within this sub-module, the ID is scanned to retrieve user details, including the scanned
barcode, user name, date and time, department, category, and whether the user is currently in or
out status.
17
REPORT MODULE
The report module generates the perfect format of reports which gives the details of users
and admin details.
Add Report
The report module is the form for the Student and Staff information . To store the
information like Barcode Id, Name, Department, Category for every user.
The report module is used to display all the users details such as barcode
id,name,department and category and to be printed the details.
Scan Report
This report is used to retrieve the user's details such as scanned barcode ,user name ,date
and time,department , category and in or out status .
18
4. TESTING AND IMPLEMENTATION
SYSTEM TESTING
System testing is a critical element of software quality and represents the ultimate
reviews of specification, design, and coding. System testing verifies that an application performs
tasks as designed. During earlier definition and development phases, it was attempted to build
the software from an abstract concept to a tangible implementation. No system is error free
because it is so until the next error crops up during any phase of development or usage of the
product. A sincere effort however needs to be put to bring out a product that is satisfactory.
● A good test case is one that has a high probability of finding and as yet
undiscovered error.
UNIT TESTING
Unit testing focuses verification efforts on the smallest unit of software design, the
module. This is also known as “Module Testing” The modules are tested separately this testing is
carried out during the programming stage itself. In this step each module is found to be working
satisfaction as regard to the expected output from the module.
19
INTEGRATION TESTING
Integration testing focuses on the design and construction of the software architecture.
Data can be lost across an interface, one module can have adverse effects on another sub
function and show on. Thus integration testing is a systematic technique for constructing tests to
uncover errors associated with the interface. In this project, all the modules are companies and
then the entire program is tested as a whole.
VALIDATION TESTING
Validation testing is the requirement established as a part of software requirement
analysis that is validated against the software that has been constructed. This test provides the
final assurance whether the software needs all functional, behavioral and performance
requirements.
Thus the proposed system under consideration has been tested by using validation testing
and found to be working satisfactory.
2
SYSTEM IMPLEMENTATION
5. CONCLUSION
In conclusion, the pivotal phase of bringing the designed system to life in the ID Card
Barcode Reader project is the implementation phase. Essential functionalities see active
contributions from skilled programmers who engage in coding and logic creation, ensuring the
seamless integration of various modules. The success of the system is influenced by efficient
storage and retrieval of user information, user training, and meticulous testing. The system's
usability and maintenance are improved through comprehensive documentation and user
feedback. The culmination of this phase is marked by the deployment of the fully implemented
ID Card Barcode Reader system, highlighting its effectiveness, user acceptance, and seamless
functionality in real-world scenarios. A successful transition from design to a fully operational
and reliable system is underscored by the importance of continuous communication, testing, and
user engagement.
2
5.1 BIBLIOGRAPHY
Text Books
Website Refer
1.www.javapoint.com
2.www.W3Schools.com
2
APPENDICES
<?php
$host = "localhost";
$user = "root";
$password = '';
$db_name = "bar";
<?php
include('connection.php');
$username = $_POST['user'];
$password = $_POST['pass'];
$username = stripcslashes($username);
$password = stripcslashes($password);
$username = mysqli_real_escape_string($con, $username);
$password = mysqli_real_escape_string($con, $password);
$sql = "select *from login where username = '$username' and password ='$password'";
$result = mysqli_query($con, $sql);
$row = mysqli_fetch_array($result, MYSQLI_ASSOC);
$count = mysqli_num_rows($result);
2
if($count == 1){
echo "<h1><center> Login successful </center></h1>";
header('location:home.html');
exit;
}
else{
echo "<h1> Login failed. Invalid username or password.</h1>";
}
?>
<html>
<head>
<title>Login system</title>
<link rel = "stylesheet" type = "text/css" href = "style.css">
<style>
body {
font-family: 'Arial', sans-serif;
background: #f2f2f2;
margin: 0;
padding: 0;
display: flex;
align-items: center;
justify-content: center;
height: 100vh;
}
#frm {
border: 1px solid #ccc;
border-radius: 5px;
background: #fff;
2
padding: 30px;
width: 300px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
h1 {
text-align: center;
color: #333;
}
label {
display: block;
margin: 10px 0 5px;
color: #555;
}
input[type="text"],
input[type="password"] {
width: 100%;
padding: 10px;
margin-bottom: 10px;
border: 1px solid #ccc;
border-radius: 3px;
box-sizing: border-box;
}
input[type="submit"] {
width: 100%;
padding: 10px;
border: none;
background-color: #337ab7;
color: #fff;
2
cursor: pointer;
border-radius: 3px;
}
input[type="submit"]:hover {
background-color: #286090;
}
</style>
</head>
<body>
<div id = "frm">
<h1>Officer Login</h1>
<form name="f1" action = "authentication.php" onsubmit = "return validation()" method =
"POST">
<p>
<label> Officer Name: </label>
<input type = "text" id ="user" name = "user" />
</p>
<p>
<label> Password: </label>
<input type = "password" id ="pass" name = "pass" />
</p>
<p>
<input type = "submit" id = "btn" value = "Login" />
</p>
</form>
</div>
<script>
function validation()
{
3
var id=document.f1.user.value;
var ps=document.f1.pass.value;
if(id.length=="" && ps.length=="") {
alert("Officer Name and Password fields are
empty"); return false;
}
else
{
if(id.length=="") {
alert("Officer Name is empty");
return false;
}
if (ps.length=="") {
alert("Password field is empty");
return false;
}
}
}
</script>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Id Card Barcode Scanner</title>
<scripttype="text/javascript"src="https://cdnjs.cloudflare.com/ajax/libs/quagga/0.12.1/quagga.mi
n.js"></script>
3
<script src="https://code.jquery.com/jquery-3.6.4.min.js"></script>
<style>
table {
width: 100%;
border-collapse: collapse;
margin-top: 20px;
}
th, td {
border: 1px solid #ddd;
padding: 8px;
text-align: left;
}
th {
background-color: #f2f2f2;
}
</style>
</head>
<body>
<div class="container">
<div class="row">
<div class="col-md-6">
<div id="scanner" class="col-6"></div>
</div>
<div class="col-md-6" style="background-color: blue;">
<label>Scanned Barcode</label>
<input type="text" id="scanned-barcode" class="form-control">
<label>Date and Time</label>
<input type="text" id="date-time" class="form-control">
<label>Name</label>
3
<input type="text" id="name" class="form-control">
<label>Department</label>
<input type="text" id="department" class="form-control">
<label>Category</label>
<input type="text" id="category" class="form-control">
</div>
</div>
</div>
<script>
Quagga.init({
inputStream: {
name: "Live",
type: "LiveStream",
target: document.querySelector('#scanner'),
constraints: {
width: 480,
height: 320,
facingMode: "environment"
}
},
decoder: { readers: ["code_128_reader", "ean_reader", "upc_reader", "code_39_reader",
"code_39_vin_reader", "codabar_reader", "i2of5_reader", "2of5_reader", "code_93_reader"]
}
}, function(err) {
if (err) {
console.error('Error initializing:', err);
return;
}
console.log('Barcode initialized successfully.');
3
Quagga.start();
});
Quagga.onDetected(function(result) {
var code = result.codeResult.code;
console.log('Barcode detected:', code);
var allowedPrefixes = ['211CS',
'221CS'];
$.ajax({
url: 'retrievedata.php',
type: 'GET',
data: { barcode_id: code },
dataType: 'json',
success: function(data) {
console.log('Data from database:', data);
document.getElementById('name').value = data.name;
document.getElementById('department').value = data.department;
document.getElementById('category').value = data.category;
},
error: function(error) {
console.error('Error retrieving data:', error.responseText);
}
3
});
}
});
</script>
</body>
</html>
<?php
include('connection.php');
$barcode_id = $_GET['barcode_id'];
$conn = new mysqli($host, $user, $password, $db_name);
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$sql = "SELECT * FROM user WHERE Barcode_id='$barcode_id'";
$result = $conn->query($sql);
if ($result) {
$data = $result->fetch_assoc();
header('Content-Type: application/json');
echo json_encode($data);
}
else {
$conn->close();
?>
3
D.SAMPLE INPUT
4
Admin Login Page
4
Admin Login Page Successful
4
Add Users Details
4
Add Users Details
4
Barcode Scanning