You are on page 1of 75

CASE STUDY REPORT

ON

DCS27 DATABASE & WEB PROGRAMMING LAB

LIBRARY MANAGEMENT SYSTEM

BY
MUHAMMED THAMEEM M (811201052)

Submitted in partial fulfillment of the


Requirements for the award M.Sc. (Computer Science) degree of
University of Kerala
2020-2022
SCHOOL OF DISTANCE EDUCATION UNIVERSITY OF
KERALA KARIAVATTOM

DECLARATION

I hereby declare that the work presented in the case study titled LIBRARY
MANAGEMENT SYSTEM is the original work done by us under the guidance of
Mrs.Lekshmi A C Lecturer of the Computer Science department. The same work has
not been submitted elsewhere or any other degree.

MUHAMMED THAMEEM M
SCHOOL OF DISTANCE EDUCATION
UNIVERSITY OF KERALA
KARIAVATTOM.

CERTIFICATE

This is to certify that the project report entitled “LIBRARY MANAGEMENT SYSTEM”

submitted to School of Distance Education, University of Kerala in partial fulfillment of the

requirement for the award of the Degree of MASTER OF COMPUTER SCIENCE, is an authentic

original work carried out by MUHAMMED THAMEEM (811201052)

External Examiner1
Lecturer in charge

External Examiner2
ACKNOWLEDGEMENT

We gratefully acknowledge the support and kind hearted cooperation by Mrs. Liji I H
Coordinator of M.Sc. Computer Science department and It is a great pleasure for me to
acknowledge the assistance of my case study guide Mrs. Lekshmi A C.

We extend our heartfelt thanks to our classmates, friends and well-wishers who helped us to
make this case study success. Above all we are thankful to God, almighty for the strength and
presence of mind to complete these studies successfully, we humbly solicit almighty's
blessings. Our sincere thanks and apologies to anyone who deserves the credit but whose
names fail to appear in the list above.

MUHAMMED THAMEEM M
ABSTRACT

In this Library Management System is a project based on the language PHP., you can enter
the record of new books and retrieve the details of books available in the library. You can issue
the books to the students and maintain their records. A college library management is a project
that manages and stores books information electronically according to student’s needs. The
system helps both students and library manager to keep a constant track of all the books available
in the library. It allows both the admin and the student to search for the desired book. It becomes
necessary for colleges to keep a continuous check on the books issued. . This task if carried out
manually will be tedious and includes chances of mistakes. These errors are avoided by allowing
the system to keep track of information such as issue date, last date to return the book. Thus this
system reduces manual work to a great extent allows smooth flow of library activities by
removing chances of errors in the details.
TABLE OF CONTENTS

1. INTRODUCTION 1
2. SYSTEM ANALYSIS 2
2.1 EXISTING SYSTEM 3
3.2 PROPOSED SYSTEM 5
3. SYSTEM SPECIFICATION 7
3.1 HARDWARE SPECIFICATION 7
3.2 SOFTWARE SPECIFICATION 7
3.3 DEVELOPING TOOLS 8
4. SYSTEM DESIGN 13
4.1 INPUT DESIGN 13
4.2 OUTPUT DESIGN 14
4.3 DATABASE DESIGN 15
4.4 DATA FLOW DIAGRAM 17
5. SYSTEM IMPLEMENTATION & TESTING 27
6.1 MODULE DESCRIPTION 27
6.2 IMPLEMENTATION
6.2 TESTING 28
6. CONCLUSION 31
7. REFERENCES 33
APPENDIX
Source code
Screenshots
1. INTRODUCTION

As the name suggest the LIBRARY MANAGEMENT SYSYTEM is a software which handles
the entire data of library. It makes the work of librarian very easy instead of writing data in a
notebook. In past the librarians were using notebooks to write the data of books along with
students name who borrowed that book. So it was very difficult to keep track on each and every
book.

If librarian want’s to search for a particular book then that task was very time consuming. This
program has been developed using PHP at Front End and file handling at Back End using SQL.
The software is very user friendly.
The system excludes the use of paper work by managing all the book information electronically.
Admin can keep updating the system by providing the new books arrival in system and their
availability thus students need not to go to library for issuing purpose. The system has books
well organized and systematically arranged in different categories in the system so that user can
easily search and find the book. Thus, it saves human efforts and resources.
1. SYSTEM ANALYSIS

2.1 EXISTING SYSTEM

Time and access can be obstacles to library research. Readers must get to the library during
library hours, which may not be convenient. They also may need to stay in the library for a long
time to ensure they have exhausted all resources. Some resources may not be available for
checkout, which means the student must stay in the library to use them. And those that do
circulate may be checked out by others and unavailable to anyone else.

The existing system is maintained manually. In the present system whenever the student and
librarian library details are maintained manually in the Reister bookS. Manually they have to
update the library details if they change datas. And it's very difficult to find someone's contact
number from the book easily.

System Analysis is a detailed study of the various operations performed by a system and their
relationships within and outside of the system. Here the key question is: What all problems exist
in the present system? What must be done to solve the problem? Analysis begins when a user or
manager begins a study of the program using existing system. In our existing system all the
transaction of books are done manually. So taking more time for a transaction like borrowing a
book or returning a book and also for searching of members and books. Another major
disadvantage is that to preparing the list of books borrowed and the available books in the library
will take more time, currently it is doing as a one day process for verifying all records. So we can
say, Fast report generation is not possible Tracing a book is difficult Information about
issue/return of the books is not properly maintained No central database can be created as
information is not available in database So after conducting the feasibility study we decided to
make the manual Library management system to be computerized.

2. PROPOSED SYSTEM
Proposed system is an automated Library Management System. Through our software
user can add books, search books, renewal, update information, edit information, and return
books in quick time. Our proposed system has the following advantages. This objective
overcame all the short comings of a manual system that was used daily. This includes the
following:
1. Developed a well-organized book issue and searching system.
2. Produced a well-designed and functioning system in accordance to the needs and
wants of the borrowers.
3. Minimized the task and the effort being performed by both the owners and borrowers.
4. Provided the school and the students a well-organize and well-presented reports.
5. User friendly interface
6. Fast access to database
7. Less error
8. More Storage Capacity
9. Search facility
10. Look and Feel Environment
11. Quick transaction
3. SYSTEM SPECIFICATION

3.1 HARDWARE SPECIFICATION


Processor : Intel 3

Installed memory (RAM) : 4 GB

Hard Disk : 500 GB

Operating System : Windows 7,8,10 - 64 bit

3.2 SOFTWARE SPECIFICATION

Front End: HTML5, CSS3, Bootstrap

Back End: PHP, MYSQL

Control End: Angular Java Script

PHP Tools:

xampp-win32-5.5.19-0-VC11

Functional requirements:

 Should allow free hand drawing, object shapes such as circle, eclipse, and
rectangle for flow chart.

Non-functional requirements:

 Should have adaptability to allow usage of single module at a time


 Must enable faster processing of operations when a module is selected

3.3 DEVELOPMENT TOOLS


 Notpad++
 Sql
 Web Browser (Chrome,Mozila…etc)
1. SYSTEM DESIGN

4.1 INPUT DESIGN


The input to the system has been designed in such a way that manual forms and the
inputs are coordinated where the data elements are common to the source documents and
to the input.

Input design is a part of overall system design that requires special attention because it is
the common source for data processing error. The goal of designing input data is to make
the entry easy and free from errors.

The "Library Management System" has been developed in a user-friendly manner. The
system has been designed so as to get a minimum number of inputs from the user. The
system promotes the data entry operator with menus and screens

4.2 OUTPUT DESIGN

The various outputs have been designed in such a way that they present the same format
that was used. In layout, the important items are highlighted so that they are easier to
find.

The program is designed in such a way that all pages have a title. Unique name is also
printed to show when the output has been prepared. It's also taken care of program by
giving the necessary details.

4.3 DATABASE DESIGN.


Once the input data is captured in the database system, these may be preserved for a long
period. This data will generally be stored in the database in a logical manner. The
designer will have to devise the techniques of storing and retrieving data from these
databases.
4.4 DATA FLOW DESIGN

0 LEVEL DATA FLOW DIAGRAM

LIBRARY
MANAGEMENT
SYSYTEM

STUDENT LIBRARIAN
FIRST LEVEL DATA FLOW DIAGRA

LIBRARY
MANAGEMENT
SYSTEM

LOGIN

STUDENT

VIEW RETURN SEARCH LOGOUT


BOOKS BOOKS BOOK

LIBRARIAN

SEARCH CHANGE LOGOUT


VIEW ALL STUDENT ADD
SECOND
BOOKS
LEVEL
APPROVAL
DATA FLOW
BOOKS
DIAGRAM
BOOK PASSWORD
DATA FLOW DIAGRAM VIEW BOOKS

STUDENT

LOGIN

VIEW BOOK LIST

BOOK DETAILS
DATA FLOW DIAGRAM BOOKS

STUDENT

LOGIN

RETURN BOOK

AVAILABLE DATA
NO DATA AVAILABLE

STATUS
NO BOOKS IN YOUR
ACCOUNT

RETURN
DATA FLOW DIAGRAM SEARCH BOOKS

STUDENT

LOGIN

SEARCH BOOK

ENTER THE TITLE


OF THE BOOK TO BE
SEARCHED

BOOK NOT AVILABLE AVILABLE BOOK

VIEWED BOOK DETAILS


NULL

STATUS

GET
ISSUED
DATA FLOW DIAGRAM LOG OUT

STUDENT

LOGIN

LOG OUT

HOME PAGE
DATA FLOW DIAGRAM VIEW BOOKS

LIBRARIAN

LOGIN

VIEW ALL BOOKS

VIEW BOOK DETAILS


AND BOOK ISSUED
STUDENT DETAILS OR
ISSUE STATUS IS
AVAILABLE

OPTION

DELETE EDIT

EDIT DETAILS AND UPDATE


DATA FLOW DIAGRAM APPROVAL STATUS

LIBRARIAN

LOGIN

APPROVAL STATUS

VIEW STUDENT
DETAILS

STATUS

APPROVED APPROVE
DATA FLOW DIAGRAM ADD BOOK

LIBRARIAN

LOGIN

ADD BOOK

ENTER THE BOOK


DETAILS AND ENTER

SUBMIT RESET
DATA FLOW DIAGRAM SEARCH BOOK

LIBRARIAN

LOGIN

SEARCH BOOK

VIEW BOOK DETAILS


AND BOOK ISSUED
STUDENT DETAILSISSUE
OR
ISSUE STATUS IS
AVAILABLE.

OPTION

DELETE EDIT

EDIT DETAILS AND UPDATE


DATA FLOW DIAGRAM LOG OUT

LIBRARIAN

LOGIN

LOG OUT

HOME PAGE
5. SYSTEM IMPLEMENTATION & TESTING

5.1 MODULE DESCRIPTION

The project is divided into Two module according to the functionality.


 Student Module.
 Librarian Module

1. STUDENT MODULE
Students have to register themselves into the system to create an account. Students are given a
register number and password at the time of registration and login using that register number and
password. The students can also view the list of the books available in the entire library database.

1.1 View Booklist

In this menu option all the students will be able to view the books present in the database along
with their details. Get the available books if required.

1.2 Search For a Book

We have given access to the students to search for a particular book. The student can search book
either by book name. Get the available books if required.

1.3 Return book

Here students can see the details of the books taken by the students, If you give the return option
here, the book will be returned.

1.4 Logout

By clicking the logout option, The student account page will be redirected to home page.

2. LIBRARIAN MODULE
In this project, the librarian can add, update, delete and create books,The entire rights are given
to the librarian to adding books, approving student account, and modify the book. This project
uses file handling to store the data of books in a project. The student can login only with the
approval of the librarian are the main features of this project
2.1 View Books

Same as students view books, librarians will also able to see the books available in the library
database and edit, delete options are available in view books.

2.2 Approval Status of Students

Here librarian can see the details of the registered students, if approved ,the status will be
approved and if not, the status will be approve. If approved, the student will be able to login.

2.3 Add Book

Enter the details of the books then submit , Reset option are available.

2.4 Search For a Book

We have given access to the librarian to search for a particular book, also seeing details of the
student who took this book. The Librarian can search book either by book name. Edit or delete
the searched book if required

2.5 Logout

By clicking the logout option, The Librarian account page will be redirected to home page.

5.2 IMPLEMENTATION

In this project , create, read, update, and delete (CRUD) are the four basic operations of
persistent storage. CRUD is also sometimes used to describe user interface conventions that
facilitate viewing, searching, and changing information using computer-based forms and reports.
Data can be put in a location/area of a storage mechanism.

 The fundamental feature of a storage location is that its content is


both readable and updatable.
 Before a storage location can be read or updated it needs to be created; that is allocated and
initialized with content.
 At some later point the storage location may need to be destructed; that is finalized and
deallocated.
Together these four operations make up the basic operations of storage management known as
CRUD: Create, Read, Update and Delete.

 Create - add new books and student details.


 Read, retrieve, search, -view existing books and student details.
 Update, or edit existing books.
 Delete, deactivate, or remove existing book.
SQL:-
SQL is a language to operate databases; it includes database creation, deletion, fetching rows,
modifying rows, etc. SQL is an ANSI (American National Standards Institute) standard
language, but there are many different versions of the SQL language.
SQL is Structured Query Language, which is a computer language for storing, manipulating and
retrieving data stored in a relational database.
SQL is the standard language for Relational Database Systems. All the Relational Database
Management Systems (RDMS) like MySQL, MS Access, Oracle, Sybase, Informix, Postgres
and SQL Server use SQL as their standard database language.
The acronym CRUD refers to the major operations which are implemented by databases. Each
letter in the acronym can be mapped to a standard Structured Query Language (SQL) statement.

5.3 TESTING

Software testing is a critical element for software quality assurance and represents the ultimate
review of specification, design and coding. System testing is actually a series of different tests
whose primary objective is to fully exercise the computer based system. Although each test has a
different purpose, all of them work to verify the, and conducted successfully, it will uncover any
errors in the software. As a secondary benefit, testing could demonstrate that performance has
been met.

SYSTEM TESTING

System Testing is the stage of implementation, which is aimed at ensuring that the system works
accurately and efficiently as expected before live operation commences. It certifies that the
whole set of program hang together. System testing requires a test plan that consists of several
keys, activities and steps to run program, string, system and user acceptance testing. The
implementation of newly designed package is important in adopting a successful new system.

TEST CASES PURPOSE

A good test is one that has a high probability of finding an as yet undiscovered error. They are all about
making sure that the product fulfills the requirements of the system. Then all about making sure that the
product fulfills the requirement of the system. Then the test procedures are designed for these test cases
and finally test scripts are created to implements the procedures. Two types of test case designs are white
box testing and black box testing. White box testing also called glass-box testing and it is focus on the
program control structure. Black box testing method focus on functional requirements of the software.
QUALITY

Quality software is reasonably bug-free, delivered on time and within budget, meets
requirements and/or expectations, and is maintainable. However, quality is obviously subjective
term. It will depend on who the customer is and their overall influence in the scheme of things. A
wide angle view of the customers of a software development project might include end-users,
customer acceptance testers, customer contract officers, customer management, the development
organization's management/account/testers/sales people, and future software.

SOFTWARE TESTING

Testing is the process of evaluating a system or its component(s) with the intent to find whether
it satisfies the specified requirements or not.
Testing is executing a system in order to identify any gaps, errors, or missing requirements in
contrast to the actual requirements.
 Cost Effective Development - Early testing saves both time and cost in many aspects,
however reducing the cost without testing may result in improper design of a software
application rendering the product useless.
 Product Improvement - During the SDLC phases, testing is never a time-consuming
process. However, diagnosing and fixing the errors identified during proper testing is a
time-consuming but productive activity.
 Test Automation - Test Automation reduces the testing time, but it is not possible to
start test automation at any time during software development. Test automaton should be
started when the software has been manually tested and is stable to some extent.
Moreover, test automation can never be used if requirements keep changing.
 Quality Check - Software testing helps in determining following set of properties of any
software such as
 Functionality
 Reliability
 Usability
 Efficiency
 Maintainability
 Portability

UNIT TESTING
In this testing we test each module individually and integrate the overall system. Unit testing
focuses verification efforts on the smaller unit of software design in the module. This is also
known as 'module' testing. The modules of the system are tested separately. The testing is
carried out during the programming stage itself. In this testing step each module is found to
work satisfactory as regard to the expected output from the module. There are some validation
checks for verifying the data input given by the user. It is very easy to find errors and debug the
system.

INTEGRATION TESTING

Data can be lost across an interface; one module can have an adverse effect on the other sub
functions when combined by May not produce the desired major functions. Integrated testing is
the systematic testing for constructing the uncover errors within the interface. This testing was
done with sample data. The need for an integrated test is to find the overall system performance.

IMPLEMENTATION TESTING

Implementation testing generally refers to the process of testing implementations of


technology specifications. This process serves the dual purpose of verifying that the
specification is implementable in practice, and that implementations conform to the
specification. This process helps to improve the quality and interoperability of implementations
6. CONCLUSION

ADVANTAGES

The Library management system needs to be computerized to reduce human errors and to
increase the efficiency. The proposed Library management system in this proposal will be a
computerized management system developed to maintain all the daily work of library. Library
management systems are designed to store all the information about books and members. The
main focus of this project is to lessen human effort and encourage efficient record keeping.
Though we are making an offline version. If we able to make online version and also a student
(member) viewing section through creating account on this system.

 User friendly interface

 Fast access to database

 Less error

 More Storage Capacity

 Search facility

 Look and Feel Environment

 Quick transaction

Disadvantages

 The data stored is prone to cyber hacks. ...


 Costly and Expensive.
 Complicated to operate.
 Online Systems require high-speed internet connectivity.
 Risk of computer virus.
7. REFERENCES
Website :-
 https://www.php.net/
 https://www.w3schools.com/php/
 https://stackoverflow.com/
 https://www.w3schools.com/sql/
 https://www.w3schools.com/jquery/

Books:-

 PHP and MySQL Web development

 Learning PHP, MySQL, JavaScript, CSS, and HTML5: A Step-by-Step Guide to


Creating dynamic websites
APPENDIX
SOURCE CODE
///// CONNECTION PAGE///////

Conn.php

<?php

//Establishing connection with the database

define('DB_SERVER', 'localhost');

define('DB_USERNAME', 'root');

define('DB_PASSWORD', '');

define('DB_DATABASE', 'books'); //where books is the database name

$db = mysqli_connect(DB_SERVER,DB_USERNAME,DB_PASSWORD,DB_DATABASE);

?>

///////INDEX PAGE//////

index.php

<!DOCTYPE html>

<html>

<title>library management systemn</title>

<meta charset="UTF-8">

<meta name="viewport" content="width=device-width, initial-scale=1">

<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">

<body>

<!-- Navbar (sit on top) -->

<div class="w3-top">
<div class="w3-bar w3-white w3-wide w3-padding w3-card">

<a href="#home" class="w3-bar-item w3-button"><b>LIBRARY MANAGEMENT SYSTEM</b></a>

<!-- Float links to the right. Hide them on small screens -->

<div class="w3-right w3-hide-small">

<a href="loginn.php" class="w3-bar-item w3-button">LOGIN</a>

<a href="#about" class="w3-bar-item w3-button">About</a>

<a href="#contact" class="w3-bar-item w3-button">Contact</a>

</div>

</div>

</div>

<!-- Header -->

<header class="w3-display-container w3-content w3-wide" style="max-width:1500px;" id="home">

<img class="w3-image" src="BANNER.jpg" alt="Architecture" width="1500" height="800">

<div class="w3-display-middle w3-margin-top w3-center">

<h1 class="w3-xxlarge w3-text-white"><span class="w3-padding w3-black w3-opacity-


min"><b>LIBRARY</span></h1>

</div>

</header>

<!-- Page content -->

<div class="w3-content w3-padding" style="max-width:1564px">

<!-- Project Section -->

<div class="w3-container w3-padding-32" id="projects">

<h3 class="w3-border-bottom w3-border-light-grey w3-padding-16">Projects</h3>

</div>
<div class="w3-row-padding">

<div class="w3-col l3 m6 w3-margin-bottom">

<div class="w3-display-container">

<div class="w3-display-topleft w3-black w3-padding">Summer House</div>

<img src="img1.jpg" alt="House" style="width:100%">

</div>

</div>

<div class="w3-col l3 m6 w3-margin-bottom">

<div class="w3-display-container">

<div class="w3-display-topleft w3-black w3-padding">Brick House</div>

<img src="img2.jpg" alt="House" style="width:100%">

</div>

</div>

<div class="w3-col l3 m6 w3-margin-bottom">

<div class="w3-display-container">

<div class="w3-display-topleft w3-black w3-padding">Renovated</div>

<img src="img4+.jpg" alt="House" style="width:100%">

</div>

</div>

<div class="w3-col l3 m6 w3-margin-bottom">

<div class="w3-display-container">

<div class="w3-display-topleft w3-black w3-padding">Barn House</div>

<img src="/w3images/house4.jpg" alt="House" style="width:100%">

</div>

</div>

</div>
<div class="w3-row-padding">

<div class="w3-col l3 m6 w3-margin-bottom">

<div class="w3-display-container">

<div class="w3-display-topleft w3-black w3-padding">Summer House</div>

<img src="/w3images/house2.jpg" alt="House" style="width:99%">

</div>

</div>

<div class="w3-col l3 m6 w3-margin-bottom">

<div class="w3-display-container">

<div class="w3-display-topleft w3-black w3-padding">Brick House</div>

<img src="/w3images/house5.jpg" alt="House" style="width:99%">

</div>

</div>

<div class="w3-col l3 m6 w3-margin-bottom">

<div class="w3-display-container">

<div class="w3-display-topleft w3-black w3-padding">Renovated</div>

<img src="/w3images/house4.jpg" alt="House" style="width:99%">

</div>

</div>

<div class="w3-col l3 m6 w3-margin-bottom">

<div class="w3-display-container">

<div class="w3-display-topleft w3-black w3-padding">Barn House</div>

<img src="/w3images/house3.jpg" alt="House" style="width:99%">

</div>

</div>

</div>
<!-- About Section -->

<div class="w3-container w3-padding-32" id="about">

<h3 class="w3-border-bottom w3-border-light-grey w3-padding-16">About</h3>

<p> A library is a collection of sources of information and similar resources, made accessible to a
defined community for reference or borrowing. It provides physical or digital access to material and
may be a physical building or room, or a virtual space, or both. A library's collection can include
books, periodicals, newspapers, manuscripts, films, maps, prints, documents, microform, C Ds,
cassettes, videotapes, DVDs, Blu-ray Discs, e-books, audiobooks, databases, and other formats.
Libraries range in size from a few shelves of books to several million items. Sidney Sheldon
perfectly describes: “Libraries store the energy that fuels the imagination. They open up windows to
the world and inspire us to explore and achieve, and contribute to improving our quality of life.” </p>

</div>

<div class="w3-row-padding w3-grayscale">

<div class="w3-col l3 m6 w3-margin-bottom">

<img src="/w3images/team2.jpg" alt="John" style="width:100%">

<h3>John Doe</h3>

<p class="w3-opacity">CEO & Founder</p>

<p>Phasellus eget enim eu lectus faucibus vestibulum. Suspendisse sodales pellentesque elementum.</p>

<p><button class="w3-button w3-light-grey w3-block">Contact</button></p>

</div>

<div class="w3-col l3 m6 w3-margin-bottom">

<img src="/w3images/team1.jpg" alt="Jane" style="width:100%">

<h3>Jane Doe</h3>

<p class="w3-opacity">Architect</p>

<p>Phasellus eget enim eu lectus faucibus vestibulum. Suspendisse sodales pellentesque elementum.</p>

<p><button class="w3-button w3-light-grey w3-block">Contact</button></p>

</div>
<div class="w3-col l3 m6 w3-margin-bottom">

<img src="/w3images/team3.jpg" alt="Mike" style="width:100%">

<h3>Mike Ross</h3>

<p class="w3-opacity">Architect</p>

<p>Phasellus eget enim eu lectus faucibus vestibulum. Suspendisse sodales pellentesque elementum.</p>

<p><button class="w3-button w3-light-grey w3-block">Contact</button></p>

</div>

<div class="w3-col l3 m6 w3-margin-bottom">

<img src="/w3images/team4.jpg" alt="Dan" style="width:100%">

<h3>Dan Star</h3>

<p class="w3-opacity">Architect</p>

<p>Phasellus eget enim eu lectus faucibus vestibulum. Suspendisse sodales pellentesque elementum.</p>

<p><button class="w3-button w3-light-grey w3-block">Contact</button></p>

</div>

</div>

<!-- Contact Section -->

<div class="w3-container w3-padding-32" id="contact">

<h3 class="w3-border-bottom w3-border-light-grey w3-padding-16">Contact</h3>

<p>Lets get in touch and talk about your next project.</p>

<form action="/action_page.php" target="_blank">

<input class="w3-input w3-border" type="text" placeholder="Name" required name="Name">

<input class="w3-input w3-section w3-border" type="text" placeholder="Email" required


name="Email">

<input class="w3-input w3-section w3-border" type="text" placeholder="Subject" required


name="Subject">

<input class="w3-input w3-section w3-border" type="text" placeholder="Comment" required


name="Comment">
<button class="w3-button w3-black w3-section" type="submit">

<i class="fa fa-paper-plane"></i> SEND MESSAGE

</button>

</form>

</div>

<!-- Image of location/map -->

<div class="w3-container">

<img src="/w3images/map.jpg" class="w3-image" style="width:100%">

</div>

<!-- End page content -->

</div>

<!-- Footer -->

<footer class="w3-center w3-black w3-padding-16">

<p>Powered by <a href="https://www.w3schools.com/w3css/default.asp" title="W3.CSS"


target="_blank" class="w3-hover-text-green">w3.css</a></p>

</footer>

</body>

</html>

////////LOGIN PAGE////////

<?php session_start(); ?>

loginn.php

<?php include('conn.php'); ?>

<html>

<head>

<link rel="stylesheet" type="text/css" href="style.css">

<style>

body {font-family: Arial, Helvetica, sans-serif;}


/* Full-width input fields */

input[type=text], input[type=password] {

width: 100%;

padding: 12px 20px;

margin: 8px 0;

display: inline-block;

border: 1px solid #ccc;

box-sizing: border-box;

/* Set a style for all buttons */

button {

background-color: #04AA6D;

color: white;

padding: 14px 20px;

margin: 8px 0;

border: none;

cursor: pointer;

width: 100%;

button:hover {

opacity: 0.8;

}
/* Extra styles for the cancel button */

.cancelbtn {

width: auto;

padding: 10px 18px;

background-color: #f44336;

/* Center the image and position the close button */

.imgcontainer {

text-align: center;

margin: 24px 0 12px 0;

position: relative;

img.avatar {

width: 40%;

border-radius: 50%;

.container {

padding: 16px;

span.psw {

float: right;

padding-top: 16px;
}

/* The Modal (background) */

.modal {

display: none; /* Hidden by default */

position: fixed; /* Stay in place */

z-index: 1; /* Sit on top */

left: 0;

top: 0;

width: 100%; /* Full width */

height: 100%; /* Full height */

overflow: auto; /* Enable scroll if needed */

background-color: rgb(0,0,0); /* Fallback color */

background-color: rgba(0,0,0,0.4); /* Black w/ opacity */

padding-top: 60px;

/* Modal Content/Box */

.modal-content {

background-color: #fefefe;

margin: 5% auto 15% auto; /* 5% from the top, 15% from the bottom and centered */

border: 1px solid #888;

width: 80%; /* Could be more or less, depending on screen size */

/* The Close Button (x) */


.close {

position: absolute;

right: 25px;

top: 0;

color: #000;

font-size: 35px;

font-weight: bold;

.close:hover,

.close:focus {

color: red;

cursor: pointer;

/* Add Zoom Animation */

.animate {

-webkit-animation: animatezoom 0.6s;

animation: animatezoom 0.6s

@-webkit-keyframes animatezoom {

from {-webkit-transform: scale(0)}

to {-webkit-transform: scale(1)}

}
@keyframes animatezoom {

from {transform: scale(0)}

to {transform: scale(1)}

/* Change styles for span and cancel button on extra small screens */

@media screen and (max-width: 300px) {

span.psw {

display: block;

float: none;

.cancelbtn {

width: 100%;

</style>

</head>

<body>

<div class="form-wrapper">

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

<h3>Login here</h3>

<div class="container">

<label for="uname"><b>Username</b></label>

<input type="text" placeholder="Enter Username" name="user" required>

<label for="psw"><b>Password</b></label>
<input type="password" placeholder="Enter Password" name="pass" required>

<button type="submit" title="Log In" name="login" value="Login">Login</button>

</div>

<a href="studentreg.php"> Student Register</a><br><br>

</form>

<?php

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

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

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

$query = mysqli_query($db, "SELECT * FROM studentreg WHERE


password='$password' and username='$username' ");$row =
mysqli_fetch_array($query);

//print_r($row);

$num_row = mysqli_num_rows($query);

if ($num_row > 0)

$_SESSION['id']=$row['id'];

$_SESSION['accounttype']=$row['accounttype'];

$_SESSION['status']=$row['status'];

if($row['accounttype']=='admin')

header('location:home.php');

//echo $RRR;

else

{
if($_SESSION['status']=='approved')

header('location:studenthome.php');

else{

echo 'ADMIN NOT APPROVED';

?>

</div>

</body>

</html>

/////STUDENTHOME PAGE//////

<a href="displaystudent.php"> VIW BOOKS</a><br><br>

<a href="return.php"> RETURN BOOKS</a><br><br>

<a href="searchstudentbook.php"> SEARCH BOOKS </a><br><br>

<a href="index.php"> LOGOUT</a><br><br>

<html>

///// VIW BOOKS PAGE//////

<html>
<body bgcolor="87ceeb">

<center><h2>Library Management System</h2></center>

<br>

<?php

session_start();

$sess_id = $_SESSION['id'];

include("conn.php");

// PRINT_R($_REQUEST);

IF(isset($_REQUEST["search"]) && $_REQUEST["search"] != '') {

$search = $_REQUEST["search"];

$query = "select*from book_info where title like '%$search%'" ; //search with a book name in the table
book_info

$result = mysqli_query($db,$query);

else{

$query = "select*from book_info " ; //search with a book name in the table book_info

$result = mysqli_query($db,$query);

if(mysqli_num_rows($result)>0)if(mysqli_num_rows($result)>0)

?>

<table border="2" align="center" cellpadding="5" cellspacing="5">

<tr>

<th> ISBN </th>

<th> Title </th>


<th> Author </th>

<th> Edition </th>

<th> Publication </th>

<th> Status</th>

</tr>

<?php while($row = mysqli_fetch_assoc($result))

$gtt = $row['get'];

?>

<tr>

<td><?php echo $row["isbn"];?> </td>

<td><?php echo $row["title"];?> </td>

<td><?php echo $row["author"];?> </td>

<td><?php echo $row["edition"];?> </td>

<td><?php echo $row["publication"];?> </td>

<td>

<?php

if($gtt=='selled')

echo 'ISSUED';

else

?><a href="get.php?id=<?php echo $row['id']; ?>">Get</a></td>

<?php
} ?>

</tr>

<?php

else

echo "<center>No books found in the library by the name $search </center>" ;

?>

</table>

</body>

</html>

//GET

<?php session_start();

$sess_id = $_SESSION['id'];

PRINT_R($_SESSION);

include "Conn.php"; // Using database connection file here

$id = $_GET['id']; // get id through query string

$qry = mysqli_query($db,"select * from book_info where id='$id'"); // select query


$row = mysqli_fetch_array($qry); // fetch data

if(isset($_GET['id'])) // when click on Update button

$isbn = $row['isbn'];

$title = $row['title'];

$author = $row['author'];

$edition = $row['edition'];

$publication = $row['publication'];

$edit = mysqli_query($db,"update book_info set isbn='$isbn' , title='$title', author='$author' ,


edition='$edition' , publication='$publication',get='selled', user_ID='$sess_id' where id='$id'");

if($edit)

ECHO 'SUSS';

mysqli_close($db); // Close connection

header("location:displaystudent.php"); // redirects to all records page

///exit;

else

echo mysqli_error();

ELSE
{

ECHO 'POAT ERR';

?>

////RETURN BOOK/////

<html>

<body bgcolor="87ceeb">

<center><h2>Library Management System</h2></center>

<br>

<?php

session_start();

$sess_id = $_SESSION['id'];

include("conn.php");

//$search = $_REQUEST["search"];

//and user_ID = '$sess_id'

$query = "select * from book_info where user_ID = '$sess_id' and get = 'selled'"; //search with a book
name in the table book_info

$result = mysqli_query($db,$query);

if(mysqli_num_rows($result)>0)

?>
<table border="2" align="center" cellpadding="5" cellspacing="5">

<tr>

<th> ISBN </th>

<th> Title </th>

<th> Author </th>

<th> Edition </th>

<th> Publication </th>

<th> Status</th>

</tr>

<?php

while($row = mysqli_fetch_assoc($result))

$gtt = $row['get'];

?>

<tr>

<td><?php echo $row["isbn"];?> </td>

<td><?php echo $row["title"];?> </td>

<td><?php echo $row["author"];?> </td>

<td><?php echo $row["edition"];?> </td>

<td><?php echo $row["publication"];?> </td>

<td>

<?php

if($gtt=='selled')

{?>

<a href="returnupdate.php?id=<?php echo $row['id']; ?>">RETURN</a></td>


<?php

else

?>

<?php

} ?>

</tr>

<?php

else

echo "<center>NO BOOKS IN YOUR ACCOUNT </center>" ;

?>

</table>

</body>

</html>

//RETURN

<?php

session_start();

$sid=$_SESSION['id'];

include "Conn.php"; // Using database connection file here

$id = $_GET['id']; // get id through query string


$qry = mysqli_query($db,"select * from book_info where id='$id'"); // select query

$row = mysqli_fetch_array($qry); // fetch data

if(isset($_GET['id'])) // when click on Update button

$isbn = $row['isbn'];

$title = $row['title'];

$author = $row['author'];

$edition = $row['edition'];

$publication = $row['publication'];

$GET = $row['publication'];

$edit = mysqli_query($db,"update book_info set isbn='$isbn' , title='$title', author='$author' ,


edition='$edition' , publication='$publication',get=' ' where id='$id'");

if($edit)

echo 'SUSSESS';

mysqli_close($db); // Close connection

header("location:return.php"); // redirects to all records page

///exit;

else

echo mysqli_error();

else

echo 'POAT ERR';


}

?>

////SEARCH BOOK/////

<html>

<body bgcolor="87ceeb">

<center><h2>Library Management System</h2></center>

<form action = "displaystudent.php" method="get">

<center>Enter the title of the book to be searched :

<input type="text" name="search" size="48">

<br></br>

<input type="submit" value="submit">

<input type="reset" value="Reset">

</center>

<br>

</form>

</body>

</html>

//DISPLAY BOOK

<html>

<body bgcolor="87ceeb">

<center><h2>Library Management System</h2></center>

<br>

<?php

session_start();

$sess_id = $_SESSION['id'];
include("conn.php");

// PRINT_R($_REQUEST);

IF(isset($_REQUEST["search"]) && $_REQUEST["search"] != '') {

$search = $_REQUEST["search"];

$query = "select*from book_info where title like '%$search%'" ; //search with a book name in the table
book_info

$result = mysqli_query($db,$query);

else{

$query = "select*from book_info " ; //search with a book name in the table book_info

$result = mysqli_query($db,$query);

if(mysqli_num_rows($result)>0)if(mysqli_num_rows($result)>0)

?>

<table border="2" align="center" cellpadding="5" cellspacing="5">

<tr>

<th> ISBN </th>

<th> Title </th>

<th> Author </th>

<th> Edition </th>

<th> Publication </th>

<th> Status</th>

</tr>
<?php

while($row = mysqli_fetch_assoc($result))

$gtt = $row['get'];

?>

<tr>

<td><?php echo $row["isbn"];?> </td>

<td><?php echo $row["title"];?> </td>

<td><?php echo $row["author"];?> </td>

<td><?php echo $row["edition"];?> </td>

<td><?php echo $row["publication"];?> </td>

<td>

<?php

if($gtt=='selled')

echo 'ISSUED';

Else

?>

<a href="get.php?id=<?php echo $row['id']; ?>">Get</a></td>

<?php

} ?>

</tr>

<?php

}
}

else

echo "<center>No books found in the library by the name $search </center>" ;

?>

</table>

</body>

</html>

//////LIBRARIAN HOME/////

<a href="display.php"> VIEW ALL BOOKS </a><br><br>

<a href="approvel.php"> APPROVAL STATUS OF STUDENT </a><br><br>

<a href="isertform.php"> ADD BOOKS </a><br><br>

<a href="search.php"> SEARCH BOOKS </a><br><br>

<a href="INDEX.php"> LOG OUT </a><br><br>

///////DISPLAY//////

<?php

session_start();

if(isset($_SESSION['id']))

?>

<html>

<body bgcolor="87ceeb">

<center><h2>Library Management System</h2></center>

<br>
<?php

include("conn.php");

// PRINT_R($_REQUEST);

IF(isset($_REQUEST["search"]) && $_REQUEST["search"] != '') {

$search = $_REQUEST["search"];

$query = "select * from book_info where title like '%$search%'" ; //search with a book name in the table
book_info

$result = mysqli_query($db,$query);

else{

$query = "select*from book_info" ; //search with a book name in the table book_info

$result = mysqli_query($db,$query);

if(mysqli_num_rows($result)>0)if(mysqli_num_rows($result)>0)

?>

<table border="2" align="center" cellpadding="5" cellspacing="5">

<tr>

<th> ISBN </th>

<th> Title </th>

<th> Author </th>

<th> Edition </th>

<th> Publication </th>

<th> issue </th>


<th>option</th>

</tr>

<?php while($row = mysqli_fetch_assoc($result))

$gtt = $row['get'];

?>

<tr>

<td><?php echo $row["isbn"];?> </td>

<td><?php echo $row["title"];?> </td>

<td><?php echo $row["author"];?> </td>

<td><?php echo $row["edition"];?> </td>

<td><?php echo $row["publication"];?> </td>

<td><?php

if($gtt=='selled')

$uid = $row['user_ID'];

$query2 = "select*from studentreg where id = '$uid' " ; //search with a book name in the table book_info

$result2 = mysqli_query($db,$query2);

$row2 = mysqli_fetch_assoc($result2);

echo 'ISSUED TO';?><br>

<?php

echo '<b>Reg No:</b>';

ECHO $row2['regno'];

?><br>
<?php

echo '<b>Student Name:</b>';

echo $row2['name'];

else

echo "Available";

?>

<?php

} ?>

</td>

<td> <a href="edit.php?id=<?php echo $row['id']; ?>">Edit</a>

<a href="delete.php?id=<?php echo $row['id']; ?>">Delete</a></td>

</tr>

<?php

else

echo "<center>No books found in the library by the name $search </center>" ;

?>

</table>

</body>

</html>
<?php

?>

//EDIT BOOK

<?php

include "Conn.php"; // Using database connection file here

$id = $_GET['id']; // get id through query string

$qry = mysqli_query($db,"select*from book_info where id='$id'"); // select query

$row = mysqli_fetch_array($qry); // fetch data

if(isset($_POST['update'])) // when click on Update button

$isbn = $_POST['isbn'];

$title = $_POST['title'];

$author = $_POST['author'];

$edition = $_POST['edition'];

$publication = $_POST['publication'];

$edit = mysqli_query($db,"update book_info set isbn='$isbn' , title='$title', author='$author' ,


edition='$edition' , publication='$publication' where id='$id'");

if($edit)

{
mysqli_close($db); // Close connection

header("location:display.php"); // redirects to all records page

exit;

else

echo mysqli_error();

?>

<html>

<body bgcolor="87ceeb">

<center><h2> Library Management System</h2></center>

<!--Once the form is submitted, all the form data is forwarded to InsertBooks.php -->

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

<table border="2" align="center" cellpadding="5" cellspacing="5">

<tr>

<td> Enter ISBN :</td>

<td> <input type="text" name="isbn" value="<?php echo $row['isbn'] ?>" size="48"> </td>

</tr>

<tr>

<td> Enter Title :</td>

<td> <input type="text" name="title" value="<?php echo $row['title'] ?>" size="48"> </td>

</tr>

<tr>
<td> Enter Author :</td>

<td> <input type="text" name="author" value="<?php echo $row['author'] ?>" size="48"> </td>

</tr>

<tr>

<td> Enter Edition :</td>

<td> <input type="text" name="edition" value="<?php echo $row['edition'] ?>" size="48"> </td>

</tr>

<tr>

<td> Enter Publication: </td>

<td> <input type="text" name="publication" value="<?php echo $row['publication'] ?>" size="48">


</td>

</tr>

<tr>

<td></td>

<td>

<input type="submit" name="update" value="Update">

<input type="reset" value="Reset">

</td>

</tr>

</table>

</form>

</body>

</html>

//DELETE BOOKS

<?Php

include("conn.php");
$id = $_GET['id']; // get id through query string

$del = mysqli_query($db,"delete from book_info where id = '$id'"); // delete query

if($del)

mysqli_close($db); // Close connection

header("location:display.php"); // redirects to all records page

exit;

else

echo "Error deleting record"; // display error message if not delete

?>

////APPROVAL STATUS OF STUDENT////

<?php

session_start();

if(isset($_SESSION['id']))

?>

<html>

<body bgcolor="87ceeb">

<center><h2>Library Management System</h2></center>

<br>

<?php

include("conn.php");
$search = $_REQUEST["search"];

$query = "select*from studentreg where accounttype like 'student'" ; //search with a book name in the
table book_info

$result = mysqli_query($db,$query);

if(mysqli_num_rows($result)>0)if(mysqli_num_rows($result)>0)

?>

<table border="2" align="center" cellpadding="5" cellspacing="5">

<tr>

<th> FULL NAME </th>

<th> ADDRESS</th>

<th> MOB </th>

<th> COURSE </th>

<th> REGNUMBER </th>

<th> STATUS </th>

</tr>

<?php while($row = mysqli_fetch_assoc($result))

{ $gtt = $row['status'];

?>

<tr>

<td><?php echo $row["name"];?> </td>

<td><?php echo $row["address"];?> </td>

<td><?php echo $row["mob"];?> </td>

<td><?php echo $row["course"];?> </td>

<td><?php echo $row["regno"];?> </td>

<td><?php
if($gtt=='')

?>

<a href="stuapproval.php?id=<?php echo $row['id']; ?>">approve</a>

<?php

else

echo "approved";

?>

</td>

<td>

<?php

} ?>

</tr>

<?php

else

echo "<center>No books found in the library by the name $search </center>" ;

?>

</table>

</body>
</html>

//APPROVE

<?php

session_start();

$sid=$_SESSION['id'];

include "Conn.php"; // Using database connection file here

$id = $_GET['id']; // get id through query string

$qry = mysqli_query($db,"select * from studentreg where id='$id'"); // select query

$row = mysqli_fetch_array($qry); // fetch data

if(isset($_GET['id'])) // when click on Update button

$name = $row['name'];

$address = $row['address'];

$mob = $row['mob'];

$course = $row['course'];

$edit = mysqli_query($db,"update studentreg set name='$name' , address='$address', mob='$mob' ,


course='$course' ,status='approved' where id='$id'");

if($edit)

ECHO 'SUSS';

mysqli_close($db); // Close connection

header("location:approvel.php"); // redirects to all records page

///exit;

else

{
echo mysqli_error();

else

else 'POAT ERR';

?>

////ADD KOOKS///

<html>

<body bgcolor="87ceeb">

<center><h2>Library Management System</h2></center>

<!--Once the form is submitted, all the form data is forwarded to InsertBooks.php -->

<form action="InsertBooks.php" method="post">

<table border="2" align="center" cellpadding="5" cellspacing="5">

<tr>

<td> Enter ISBN :</td>

<td> <input type="text" name="isbn" size="48"> </td>

</tr>

<tr>

<td> Enter Title :</td>

<td> <input type="text" name="title" size="48"> </td>

</tr>

<tr>

<td> Enter Author :</td>


<td> <input type="text" name="author" size="48"> </td>

</tr>

<tr>

<td> Enter Edition :</td>

<td> <input type="text" name="edition" size="48"> </td>

</tr>

<tr>

<td> Enter Publication: </td>

<td> <input type="text" name="publication" size="48"> </td>

</tr>

<tr>

<td></td>

<td>

<input type="submit" value="submit">

<input type="reset" value="Reset">

</td>

</tr>

</table>

</form>

</body>

</html>

//INSERT BOOKS

<html>

<body bgcolor="87ceeb">

<center><h2>Library Management System</h2></center>

<br>
<?php

session_start();

$sess_id = $_SESSION['id'];

//PRINT_R($_SESSION);

include("conn.php");

$isbn=$_POST["isbn"];

$title=$_POST["title"];

$author=$_POST["author"];

$edition=$_POST["edition"];

$publication=$_POST["publication"];

$query = "INSERT INTO `book_info`(`id`, `isbn`, `title`, `author`, `edition`, `publication`, `get`,
`user_ID`) VALUES

(NULL, '$isbn','$title','$author','$edition','$publication','','$sess_id')"; //Insert query to add book


details into the book_info table

$result = mysqli_query($db,$query);

if($result)

?>

<h3> Book information is inserted successfully </h3>

<a href="Search.php"> To search for the Book information click here </a>

<?php

else

echo 'errrr';

}
?

</body>

</html>

//SEARCH BOOKS
<html>

<body bgcolor="87ceeb">

<center><h2>Library Management System</h2></center>

<form action = "display.php" method="get">

<center>Enter the title of the book to be searched :

<input type="text" name="search" size="48">

<br></br>

<input type="submit" value="submit">

<input type="reset" value="Reset">

</center>

<br>

</form>

</body>

</html>
SCREENSHORTS
HOME PAGE :-

LOGIN PAGE:
STUDENT REGISTRATION:

ADMIN HOME PAGE:


VIEW ALL BOOKS OF ADMIN:

BOOKS EDIT PAGE:


APPROVEL STATUS OF STUDENT:

ADD BOOKS:
SEARCH BOOK:

STUDENT HOME PAGE:

VIEW BOOKS OF STUDENT:


RETURN BOOKS:

SEARCHED DATA PAGE:

You might also like