Project Doc Sara
Project Doc Sara
Blood Bank Management System is a web-based application. The entire project was
developed with distributed client server computing technology in mind. Through this
application anyone interested in donating blood can register through this website. Moreover,
any general patients can request blood through this site.
Admin is the main authority who can do addition, deletion and modification if required.
The project has been planned to be having the view of distributed architecture with centralized
storage of the database.
This website has been developed using the HTML, CSS, JavaScript and bootstrap for
the Front End and for backend I have used MySQL Server and PHP.
CONTENT
1 INTORDUCTION
1.1 ORGANIZATION PROFILE
1.2 SYSTEM SPECIFICATION
1.2.1 HARDWARE CONFIGURATION
1.2.2 SOFTWARE CONFIGURATION
2 SYSTEM STUDY
2.1 EXISTING SYSTEM
2.1.1 DESCRIPTION
2.1.2 DRAWBACKS
2.2 PROPOSED SYSTEM
2.2.1 DESCRIPTION
2.2.2 FEATURES
3 SYSTEM DESIGN AND DEVELOPMENT
3.1 FILE DESIGN
3.2 INPUT DESIGN
3.3 OUTPUT DESIGN
3.4 CODE DESIGN
3.5 DATABASE DESIGN
3..6 SYSTEM DEVELOPMENT
3.6.1 DESCRIPTION OF MODULES
4 TESTING AND IMPLEMENTATION
5 CONCLUSION
6 BIBLIOGRAPHY
7 APPENDICES
A. DIAGRAMS
B. SAMPLE CODING
C. SAMPLE INPUT
D.SAMPLE OUTPUT
1.INTRODUCTION
Blood Bank Management is a browser-based system that is designed to store, process,
retrieve and analyse blood related information. This project aims at maintaining all the
information pertaining to blood donors, different blood group available in this blood bank and
help them to manage in a better way. This website provides the user or the donors a secured
environment by accepting the log in ID’s and password from the user.
This application allows the user to store the donor details as soon as the donor is
registered. The admin will check the donor registered details if only he/ she is capable for
donating the blood then only the donor can donate the blood at their registered centres. Before
that the admin will send message or notification to donor registered mobile number or email.
1.1 SYSTEM SPECIFICATION
Ram : 8GB+
Storage : 128GB+
Database : MY SQL
Server : XAMPP
2.SYSTEM STUDY
The current blood bank management system relies on manual record-keeping, leading
to data inaccuracies, slow donor-recipient matching, and poor communication between blood
banks and hospitals. Tracking blood units is inefficient, causing delays and wastage. The
absence of automation increases workload and hampers transparency, making it difficult to
monitor blood usage and donor contributions.
2.1.1 DESCRIPTION
The existing blood bank management system is primarily manual, relying on paper
records and spreadsheets to track donor details, blood inventory, and recipient requests. This
approach leads to inefficiencies, including delays in updating blood stock, difficulty in finding
compatible donors, and slow communication between hospitals and blood banks. The lack of
real-time data results in inaccurate records, potential blood shortages, and wastage of expired
units. Additionally, the system increases administrative workload, making it harder to retrieve
donor histories and process urgent blood requests efficiently. The absence of automation and
centralized data management reduces transparency, security, and the overall effectiveness of
blood bank operations.
PHP
HTML
HTML or Hyper Text Markup Language is the standard markup language used to
create web pages. 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.
CSS
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 cornerstonce
specification of the web and almost all web pages use CSS style sheets to describe their
presentation.
JAVASCRIPT
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 Data consult AB. 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.
2.1.2 DRAWBACKS
The proposed Blood Bank Management System (BBMS) is a digital platform designed
to automate and streamline blood donation, storage, and distribution processes. It incorporates
a centralized database for real-time tracking of donor information, blood inventory, and
recipient requests, ensuring accurate and up-to-date records. The system will enable quick
donor-recipient matching, reducing delays and improving response times for critical blood
transfusions. Automated notifications will alert donors about eligibility for donation and notify
hospitals about available stock, enhancing communication and coordination. Blood stock
management will be improved by tracking expiration dates and generating alerts to minimize
wastage. Additionally, security features such as user authentication and access control will
safeguard sensitive donor and recipient data. By eliminating manual processes, the proposed
system will enhance efficiency, reduce administrative workload, improve transparency, and
ensure a more reliable and responsive blood bank operation.
2.2.1 DESCRIPTION
The proposed Blood Bank Management System (BBMS) is a digital solution that
automates blood donation, storage, and distribution. It features a centralized database for real-
time tracking of donor details, blood inventory, and recipient requests, ensuring accuracy and
efficiency. The system enables quick donor-recipient matching, automated notifications for
donors and hospitals, and effective inventory management to minimize wastage. Security
measures like authentication and encryption protect sensitive data. By eliminating manual
processes, the BBMS improves efficiency, reduces workload, and enhances transparency in
blood bank operations.
2.2.2 FEATURES
1. Centralized Database: Maintains real-time records of donors, blood inventory, and recipient
requests.
2. Donor Management: Stores donor details, tracks donation history, and sends reminders for
eligibility.
3. Blood Inventory Tracking: Monitors blood stock levels, expiration dates, and availability.
5. Real-Time Notifications: Alerts donors about donation eligibility and notifies hospitals about
available stock.
6.User Authentication & Security: Ensures data protection through access controls and
encryption.
7.Report Generation: Provides insights on donation trends, inventory status, and usage
statistics.
8.Online Blood Requests: Allows hospitals and individuals to request blood units digitally.
3. SYSTEM DESIGN AND DEVELOPMENT
The file design of BBMS outlines how data is stored, structured, and managed to
ensure efficient operations. Below are the key files and their attributes:
1. Donor File
• Name
• Age
• Gender
• Blood Group
• Contact Number
• Address
• Donation History
• Blood Group
• Quantity Available
• Collection Date
• Expiry Date
• Storage Location
3. Recipient File
• Name
• Age
• Gender
• Blood Group
• Contact Number
• Request Date
• Status (Pending/Approved/Completed)
• Quantity Requested
• Request Date
• Approval Status
5. Hospital/Organization File
• Name
• Address
• Contact Number
• Authorized Person
• Username
• Password (Encrypted)
• Role (Admin/Staff/Donor)
• Last Login
This structured file design ensures efficient storage, retrieval, and security of data within the
Blood Bank Management System. Let me know if you need modifications.
The input design for the Blood Bank Management System (BBMS) ensures accurate
data collection through user-friendly forms. The system includes a Donor Registration Form to
collect essential details like name, age, gender, blood group, and contact information while
tracking donation history. The Blood Donation Entry Form records donation details, including
donor ID, blood group, quantity donated, and storage location. The Blood Request Form allows
hospitals and individuals to request blood by specifying the required blood group, quantity,
urgency level, and contact details. The Recipient Registration Form manages patient
information, including name, age, blood group, hospital details, and required blood quantity. A
User Login Form authenticates users based on their roles, ensuring secure access to the system.
Additionally, the Blood Inventory Management Form helps track blood units, storage locations,
expiry dates, and availability status. To maintain data integrity, the system implements input
validation measures such as mandatory fields, dropdown selections for standardized entries,
numeric and date validations, auto-filled fields, and real-time error alerts. This structured input
design enhances efficiency, reduces manual errors, and improves overall data accuracy in blood
bankers operation.
3.3 OUTPUT DESIGN
The output design for the Blood Bank Management System (BBMS) focuses on
generating accurate, real-time reports and data summaries for efficient decision-making. The
system provides a Donor Report, which displays donor details, blood group, last donation date,
and eligibility for the next donation. The Blood Inventory Report gives an overview of
available blood units, categorized by blood group, quantity, storage location, and expiry dates,
helping prevent wastage. The Blood Request Status Report updates hospitals and individuals
on request approvals, pending requests, and fulfilled orders. A Recipient Report contains
recipient details, requested blood type, quantity received, and hospital information for tracking
purposes. The User Activity Report logs login history, role-based access, and system usage,
enhancing security. Additionally, the Blood Donation Summary Report provides insights into
donation trends, helping blood banks manage supply and demand effectively. The system
ensures outputs are generated in various formats, such as on-screen displays, printable reports,
and downloadable files (PDF/Excel), with real-time updates and easy search functionality,
improving accessibility, transparency, and operational efficiency.
3.4 CODE DESIGN
The Blood Bank Management System (BBMS) is divided into several modules to
ensure a structured and efficient approach to managing blood donations, inventory, and
requests. Below is a detailed description of each module based on the provided PDF document.
This module manages secure access to the system for different user roles, including
admin, donors, hospitals, and patients. Users can register and log in using their credentials. The
system ensures password encryption and session management to prevent unauthorized access.
This module handles the registration and verification of blood donors. It collects donor
details such as name, age, blood group, contact information, and medical history. Before
donation, the admin verifies donor eligibility based on their last donation date and health
conditions. Automated notifications are sent to donors when they become eligible for their next
donation.
This module is responsible for tracking blood stock levels, storage location, and expiry
dates. Each blood donation is logged into the database, ensuring real-time updates on blood
availability. The system also generates alerts when blood stock is running low or nearing
expiration to prevent wastage.
This module allows patients and hospitals to request blood units through the system.
Requests include blood group, required quantity, and urgency level. The admin reviews and
approves requests based on blood availability and priority levels, ensuring fair distribution.
5. Hospital/Patient Management Module
This module stores hospital and patient details, allowing hospitals to request blood
directly from the system. It also helps maintain records of transfusions and patient history,
ensuring seamless coordination between blood banks and healthcare providers.
This module automates the sending of notifications via email or SMS to donors,
hospitals, and administrators. Donors receive alerts about their eligibility for the next donation,
while hospitals receive updates on blood stock availability. Admins are notified about critical
stock levels and urgent blood requests.
This module generates various reports, including donor history, blood stock reports,
usage statistics, and request status. The reports help administrators monitor donation trends,
blood demand, and overall system performance. Data can be exported in PDF or Excel format
for further analysis.
The admin has full control over the system, including adding, deleting, or modifying
records. Admins can manage users, verify donor eligibility, monitor inventory, approve blood
requests, and generate reports.
4. TESTING AND IMPLEMENTATION
SYSTEM TESTING
System testing is a crucial stage of software development that involves testing the entire
system as a whole to ensure that it meets the desired requirements and is functioning correctly.
This type of testing is performed after the completion of the integration testing phase and before
the system is released to the end-users.
The primary objective of system testing is to validate the system's functional and non-
functional requirements and verify that it meets all the necessary specifications. It involves
testing the system's behavior under normal and abnormal conditions, evaluating its
performance, security, reliability. and scalability.
During the testing phase, defects and issues are identified, and the testing team works
to resolve them. If a defect is found, it is reported, and the development team is notified to fix
the issue. Once the defects are fixed, the system is retested to ensure that the fixes have been
successful.
There are several types of system testing, including functional testing, performance
testing. security testing, and usability testing. Functional testing verifies that the system meets
the specified functional requirements. Performance testing evaluates the system's response
time, speed, and stability under various conditions. Security testing ensures that the system is
secure from potential threats and vulnerabilities. Usability testing assesses the system's user-
friendliness and ease of use. In conclusion, system testing is a critical stage in the software
development process that ensures the system's functionality, performance, security, and
usability. It helps to identify defects and issues that need to be fixed before the system is
released to end-users, ensuring a smooth and successful deployment.
SYSTEM METHODLOGIES
Software testing methodologies are the vanous strategies or approaches used to test an
application to ensure it behaves and looks as expected. These encompass everything from front
to hack-end testing, including unit and system testing.
• Unit testing
• Integration Testing
• System testing
• Functional Testing
UNIT TESTING
The primary goal of unit testing is to identify and isolate defects in the software at an
early stage of development. Unit tests are typically automated, and the results are reported
immediately. allowing developers to identify and fix issues quickly.
• Early defect identification: Unit testing helps identify defects early in the development
cycle, when they are relatively easy and inexpensive to fix.
• Improved software quality: By identifying and fixing defects early, the quality of the
software is improved, reducing the number of issues found during system testing and
in production.
• Faster development cycles: Unit testing helps developers identify defects quickly,
allowing them to fix issues and move on to the next stage of development faster.
• Better code structure: Unit testing encourages developers to write clean, well-
structured, and modular code that is easier to test and maintain.
• Reduced costs: By identifying defects early and reducing the number of issues found in
system testing and production, unit testing can help reduce the overall cost of software
development.
Unit testing typically involves wruing test cases for each unit or component of the software.
The test cases are designed to verify that the unit betaves as expected under different conditions,
including normal and abnormal scenarios. Test cases are often designed to cover different types
of inputs, boundary conditions, and error conditions
Unit testing is typically performed by developers, who are responsible for writing the
code and the unit tests. The testing team can also be involved in reviewing and verifying the
unit tests to ensure that they cover all the required scenarios and provide adequate coverage
INTEGRATION TESTING
Integration testing is a type of testing that focuses on verifying the interfaces between
different components or modules of a software system. The primary goal of integration testing
is to ensure that the different components or modules of the system work together as expected
and produce the desired results.
Integration testing is typically performed after unit testing and before system testing.
The objective of integration testing is to verify that the individual components, which have
already been tested during unit testing, function correctly when they are integrated with other
components.
Top-Down Integration Testing: In this approach, the higher-level modules are tested
first, and the lower-level modules are added gradually until the entire system is integrated and
tested This approach requires stubs or drivers to simulate the behavior of the lower-level
modules that have not yet been developed.
Bottom-Up Integration Testing: In this approach, the lower-level modules are tested
first, and the higher-level modules are added gradually until the entire system is integrated
and tested. This approach requires the use of test harnesses to simulate the behavior of the
higher level modules that have not yet been developed
In addition to these two approaches, there is also a hybrid approach called the
"sandwich" approach, where the integration testing is conducted simultaneously from both
the top and bottom levels, with the goal of meeting in the middle
• Big Bang Integration Testing. In this type of integration testing, all the components or
modules of the system are integrated at once, and the system is tested as a whole. This
approach can be more efficient in terms of time and effort, but it can also be more
difficult to isolate and fix Issues.
• Incremental Integration Testing. In this type of integration testing, the components of
modules are integrated incrementally, and each integration is tested individually before
moving on to the next integration. This approach is more manageable and allows for
easier isolation and resolution of issues:
In conclusion, integration testing is a crucial aspect of software testing that verifies the
interfaces between different components or modules of a software system. By ensuring that the
different components of the system work together correctly, integration testing helps to identify
issues early and prevent potential problems during system testing and in production. By using
different approaches and types of integration testing, testing teams can ensure that the software
system is reliable, efficient, and functional
SYSTEM TESTING
System testing is a crucial phase in the software development life cycle that verifies
that the software system meets the specified requirements and functions as expected. It is a
type of software testing that focuses on testing the system as a whole, including its user
interfaces, APIs. databases, and other components.
The goal of system testing is to ensure that the software system is reliable, efficient,
and functional. By identifying defects and issues, enhancing the quality of the software, and
ensuring that the system meets the functional, performance, and security requirements, system
testing plays a critical role in the software development process.
FUNCTIONAL TESTING
Functional testing is a type of software testing that verifies that the software system
meets the specified functional requirements. It focuses on testing the individual functions or
features of the software system and ensuring that they work as expected. Functional testing
involves creating test cases based on the functional requirements and executing them to verify
the system's behaviour.
SYSTEM IMPLEMENTATION
The implementation of a Blood Bank Management System (BBMS) is a structured process that
involves developing a comprehensive digital platform to manage blood donations, maintain donor
records, track blood inventory, and process requests from hospitals and individuals. The system is
designed with multiple functional modules, including donor management, which registers and tracks
donor details, eligibility, and donation history, and blood inventory management, which monitors
available blood units, their expiry dates, and storage conditions. Additionally, the request management
module handles emergency and scheduled blood requests from hospitals and patients, while the user
management system ensures secure access for different roles, such as administrators, hospital staff, and
donors.
The development process begins with a requirement analysis, where system features
and user needs are defined. This is followed by UI/UX design, creating intuitive interfaces for
different user roles. The database schema is then structured to store donor details, blood stock
information, transaction logs, and request history. The backend development focuses on
creating APIs that interact with the database and serve the frontend. Frontend integration
ensures seamless user interaction, allowing users to register, request blood, track donations,
and receive notifications. Rigorous testing, including unit testing, integration testing, and
security audits, is conducted to ensure a bug-free and secure system. Finally, the system is
deployed on a cloud platform, making it accessible anytime and anywhere. Post-deployment,
continuous monitoring, maintenance, and updates are performed to enhance performance and
accommodate new features.
The development process begins with a requirement analysis, where system features
and user needs are defined. This is followed by UI/UX design, creating intuitive interfaces for
different user roles. The database schema is then structured to store donor details, blood stock
information, transaction logs, and request history. The backend development focuses on
creating APIs that interact with the database and serve the frontend. Frontend integration
ensures seamless user interaction, allowing users to register, request blood, track donations,
and receive notifications. Rigorous testing, including unit testing, integration testing, and
security audits, is conducted to ensure a bug-free and secure system. Finally, the system is
deployed on a cloud platform, making it accessible anytime and anywhere. Post-deployment,
continuous monitoring, maintenance, and updates are performed to enhance performance and
accommodate new features.
The system eliminates manual record-keeping, reduces errors, and enables real-time
tracking, ultimately improving response times for hospitals and patients in need. With features
like automated notifications, role-based access control, and data analytics, BBMS not only
optimizes blood bank operations but also promotes voluntary blood donation by keeping
donors informed and engaged.
The successful implementation of BBMS ensures that blood is readily available when
needed, reducing shortages and saving lives. As technology continues to evolve, future
enhancements such as AI-driven demand prediction and blockchain for secure data
management can further strengthen the efficiency and transparency of blood bank systems
worldwide.
7. BIBLIOGRAPHY
4. Ravi Kumar, Shubham Singh, V Anu Ragavi, “Blood Bank Management System,”
5. Blood donor selection. Guidelines on assessing donor suitability for blood donation.
http://www.who.int/bloodsafety/voluntary_donation/blood_donor_selection_counselln
g/en/ [PubMed].
system
APPENDICES
A. DIAGRAMS
ER DIAGRAM
RELATIONAL SCHEME DIAGRAM
Description: A use case diagram is a dynamic or behaviour diagram in UML. Use case diagrams
model the functionality of a system using actors and use cases. Use cases are a set of actions,
services, and functions that the system needs to perform. AUML diagram is a diagram based
on the UML (Unified Moling Language) with the purpose of visually representing a system
along with its main actors, roles, actions, artifacts or classes, in order to better understand, alter,
maintain, or document information about the system.
B. SAMPLE CODING
<!DOCTYPE html>
<html>
<head>
<title>Blood Bank Home</title>
<link rel="stylesheet" type="text/css" href="css/style.css">
</head>
<body>
<div class="header">
<div class="logo"><h2>Blood Bank Management System</h2></div>
<div class="nav">
<div id="a"><a href="index.php">Home</a></div>
<div id="b"><a href="about.php">About As</a></div>
<div id="c"><a href="contact.php">Contect Us</a></div>
<div id="d"><a href="login.php">Login</a></div>
</div>
</div>
<div class="banner"><h2 align="center" style="color: black">Blood
Bank</h2></div>
<div class="container">
<br>
<h2 align="center" style="color: red">Doctor's Information</h2>
<br><br>
<center><table border="1px">
<tr>
<td width="200px" height="50px" style="color:
red;"><center><b>Doctor
Name</b></center></td>
<td width="200px" height="50px" style="color:
red;"><center><b>Mobile
No.</b></center></td>
<td width="200px" height="50px" style="color:
red;"><center><b>Address
</b></center></td>
<td width="200px" height="50px" style="color: red;"><center>
<b>Speclization</b></center></td>
</tr>
<tr>
<td width="200px"
height="50px"><center>Mrs.Suguna.,MBBS</center></td>
<td width="200px"
height="50px"><center>8940945473</center></td>
<td width="200px"
height="50px"><center>Dharmaburi</center></td>
<td width="200px" height="50px"><center>Blood
Speclist</center></td>
</tr>
</table></center>
</div>
<!DOCTYPE html>
<html>
<head>
<title>Blood Bank About</title>
<link rel="stylesheet" type="text/css" href="css/style.css">
<style type="text/css">
#address{ width: 50%;height: 300px;float: left; }
#map{ width: 50%;height: 300px;float: left; }
</style>
</head>
<body>
<div class="header">
<div class="logo"><h2>Blood Bank Management System</h2></div>
<div class="nav">
<div id="a"><a href="index.php">Home</a></div>
<div id="b"><a href="about.php">About As</a></div>
<div id="c"><a href="contact.php">Contect Us</a></div>
<div id="d"><a href="login.php">Login</a></div>
</div>
</div>
<div class="banner"><h2 align="center" style="color: black">Blood
Bank</h2></div>
<div class="container">
<br>
<br><br>
<div id="address">
<h2> Contact Blood
Bank</h2><br>
<p> <
b>Address</b> : Irumathur</p><br>
<p> <
b>Mobile No</b> : 9677496996</p><br>
<p> <
b>E-Mail</b> :
bloodbank@143</p><br>
</div>
<div id="map"><center><img src="img/map.jpeg" width="200px"
height="300px"></center></div>
</div><br><br><br><br>
<div class="footer"><br><h2 align="center">Copyright@myproject2023-
24</h2></div>
</body>
</html>
<?php
include('connection.php');
session_start();
?>
<!DOCTYPE html>
<html>
<head>
<title>Admin Login</title>
<link rel="stylesheet" type="text/css" href="css/S1.css">
</head>
<body>
<div id="full">
<div id="inner_full">
<div id="header"><h2><a href="admin-home.php" style="text-decoration:
none;color: white;">Blood
Bank Management system</a></h2></div>
<div id="body">
<br>
<?php
$un=$_SESSION['un'];
if(!$un)
{
header("Location:index.php");
}
?>
<h1>Welcome Admin</h1><br><br>
<ul>
<li><a href="donor-reg.php">Donor Registration</a></li>
<li><a href="donor-list.php">Donor List</a></li>
<li><a href="stoke-blood-list.php">Stoke Blood List</a></li>
</ul><br><br><br><br><br>
<ul>
<li><a href="out-stoke-blood-list.php">Out Stoke Blood List</a></li>
<li><a href="exchange-blood-reg.php">Exchange Blood Registration</a></li>
<li><a href="exchange-blood-list.php">Exchange Blood List</a></li>
</ul>
</div>
<div id="footer"><h4 align="center">copyright@myprojecthd</h4>
<p align="center"><a href="logout.php"><font
color="white">Logout</font></a></p>
</div>
</div>
</div>
</body>
</html>
<?php
include('connection.php');
session_start();
?>
<!DOCTYPE html>
<html>
<head>
<title>Admin Login</title>
<link rel="stylesheet" type="text/css" href="css/S1.css">
</head>
<body>
<div id="full">
<div id="inner_full">
<div id="header"><h2>Blood Bank Management system</h2></div>
<div id="body">
<br><br><br><br><br>
<form action=""method="post">
<table align="center">
<tr>
<td width="200px" height="70px"><b>Enter Username</b></td>
<td width="100px" height="70px"><input type="text" name="un" placeholder="Enter
Username"
style="width: 180px;height: 30px;border-radius: 10px;"></td>
</tr>
<tr>
<td width="200px" height="70px"><b>Enter Password</b></td>
<td width="100px" height="70px"><input type="text" name="ps" placeholder="Enter
Password" style=“
width: 180px;height: 30px;border-radius: 10px;"></td>
</tr>
<tr>
<td><input type="submit" name="sub" value="Login" style="width: 70px;
height: 30px;border-radius: 5px;"></td>
</tr>
</table>
</form>
<?php
if(isset($_POST['sub']))
{
$un=$_POST['un'];
$ps=$_POST['ps'];
$q=$db->prepare("SELECT * FROM admin WHERE uname='$un' AND pass='$ps'");
$q->execute();
$res=$q->fetchAll(PDO::FETCH_OBJ);
if($res)
{
$_SESSION['un']=$un;
header("Location:admin-home.php");
}
else
{
echo "<script>alert('Wrong User')</script>";
}
}
?>
</div>
<div id="footer"><h4
align="center">copyright@myprojecthd</h4></di
v>
</div>
</div>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>Blood Bank About</title>
<link rel="stylesheet" type="text/css" href="css/style.css">
</head>
<body>
<div class="header">
<div class="logo"><h2>Blood Bank Management System</h2></div>
<div class="nav">
<div id="a"><a href="index.php">Home</a></div>
<div id="b"><a href="about.php">About As</a></div>
<div id="c"><a href="contact.php">Contect Us</a></div>
<div id="d"><a href="login.php">Login</a></div>
</div>
</div>
<div class="banner"><h2 align="center" style="color: black">Blood
Bank</h2></div>
<div class="container">
<br>
<h2 align="center" style="color: red">About Blood Bank</h2>
23
Source code of blood request form:
<?php
include('connection.php');
session_start();
?>
<!DOCTYPE html>
<html>
<head>
<title>Admin Login</title>
<link rel="stylesheet" type="text/css"
href="css/S1.css">
</head>
<body>
<div id="full">
<div id="inner_full">
<div id="header"><h2><a href="admin-home.php"
style="text-decoration: none;color: white;">Blood Bank
Management system</a></h2></div>
<div id="body">
<br>
<?php
$un=$_SESSION['un'];
if(!$un)
{
header("Location:index.php");
}
?>
<h1>Welcome Admin</h1><br><br>
<ul>
<li><a href="donor-reg.php">Donor
Registration</a></li>
<li><a href="donor-list.php">Donor
List</a></li>
<li><a href="stoke-blood-list.php">Stoke
Blood List</a></li>
</ul><br><br><br><br><br>
<ul>
<li><a href="out-stoke-bloodlist.
php">Out Stoke Blood List</a></li>
<li><a href="exchange-bloodreg.
php">Exchange Blood Registration</a></li>
<li><a href="exchange-bloodlist.
php">Exchange Blood List</a></li>
</ul>
</div>
<div
id="footer"><h4
align="center">copy
right@myprojecthd<
/h4>
<p
align="center"><a
href="logout.php"><
font
color="white">Logo
ut</font></a></p>
</div>
</div>
</div>
</body>
</html>
// Donar registration source code
<?php
include('connection.php');
session_start();
?>
<!DOCTYPE html>
<html>
<head>
<title>Donor Registration</title>
<link rel="stylesheet" type="text/css" href="css/S1.css">
</head>
<body>
<div id="full">
<div id="inner_full">
<div id="header"><h2><a href="admin-home.php" style="text-decoration:
none;color: white;">Blood Bank Management system</a></h2></div>
<div id="body">
<br>
<?php
$un=$_SESSION['un'];
if(!$un)
{
header("Location:index.php");
}
25
<h1>Donor Registration</h1>
<center><div id="form">
<form action=""method="post">
<table>
<tr>
<td width="200px" height="50px">Enter Name</td>
<td width="200px" height="50px"><input type="text" name="name"
placeholder="Enter Name"></td>
<td width="200px" height="50px">Enter Father's Name</td>
<td width="200px" height="50px"><input type="text" name="fname"
placeholder="Enter Father Name"></td>
</tr>
<tr>
<td width="200px" height="50px">Enter Address</td>
<td width="200px" height="50px">
<textarea name="address"></textarea></td>
<td width="200px" height="50px">Enter City</td>
<td width="200px" height="50px"><input type="text" name="city"
placeholder="Enter City"></td>
</tr>
<tr>
<td width="200px" height="50px">Enter Age</td>
<td width="200px" height="50px"><input type="text" name="age"
placeholder="Enter Age"></td>
<td width="200px" height="50px">Select Blood Group</td>
<td width="200px" height="50px">
<select name="bgroup">
<option>O+</option>
<option>AB+</option>
<option>AB-</option>
</select>
</td>
</tr>
<tr>
<td width="200px" height="50px">Enter E-Mail</td>
<td width="200px" height="50px"><input type="text" name="email"
placeholder="Enter E-Mail"></td>
<td width="200px" height="50px">Enter Mobile No</td>
<td width="200px" height="50px"><input type="text" name="mno"
placeholder="Enter Mobile No"></td>
</tr>
<tr>
<td><input type="submit" name="sub" value="Save"></td>
</tr>
</table>
</form>
<?php
<if(isset($_POST['sub']))
{
$name=$_POST['name'];
$fname=$_POST['fname'];
echo $address=$_POST['address'];
$city=$_POST['city'];
$age=$_POST['age'];
echo $bgroup=$_POST['bgroup'];
$mno=$_POST['mno'];
$email=$_POST['email'];
$q=$db->prepare("INSERT INTO donor_registration
(name,fname,address,city,age,bgroup,mno,email)
VALUES(:name,:fname,:address,:city,:age,:bgroup,:mno,:email)");
$q->bindValue('name',$name);
$q->bindValue('fname',$fname);
$q->bindValue('address',$address);
$q->bindValue('city',$city);
$q->bindValue('age',$age);
$q->bindValue('bgroup',$bgroup);
$q->bindValue('mno',$mno);
$q->bindValue('email',$email);
if($q->execute())
{
echo "<script>alert('Donor Registration Successfull')</script>";
}
else
{
echo "<script>alert('Donor Registration Fail')</script>";
}
}
?>
</div></center>
</div>
<div id="footer"><h4 align="center">copyright@myprojecthd</h4>
<p align="center"><a href="logout.php"><font
color="white">Logout</font></a></p>
</div>
</div>
</div>
</body>
</html>
<?php
include('connection.php');
session_start();
?>
<!DOCTYPE html>
<html>
<head>
<title>Donor Registration</title>
<link rel="stylesheet" type="text/css" href="css/S1.css">
<style type="text/css">
td
{
width: 200px;
height: 40px;
}
</style>
</head>
<body>
<div id="full">
<div id="inner_full">
<div id="header"><h2><a href="admin-home.php" style="text-decoration:
none;color: white;">Blood Bank Management system</a></h2></div>
<div id="body">
<br>
<?php
$un=$_SESSION['un'];
if(!$un)
{
header("Location:index.php");
}
?>
<h1>Donor Registration</h1>
<center><div id="form">
<table>
<tr>
<td><center><b><font
color="blue">Name</font></b></center></td>
<td><center><b><font color="blue">Father's
Name</font></b></center></td>
<td><center><b><font
color="blue">Address</font></b></center></td>
<td><center><b><font
color="blue">City</font></b></center></td>
<td><center><b><font
color="blue">Age</font></b></center></td>
<td><center><b><font color="blue">Blood
Group</font></b></center></td>
<td><center><b><font color="blue">Mobile
No</font></b></center></td>
<td><center><b><font color="blue">EMail</
font></b></center></td>
</tr>
<?php
$q=$db->query("SELECT * FROM donor_registration");
while($r1=$q->fetch(PDO::FETCH_OBJ))
{
?>
<tr>
<td><center><?= $r1->name; ?></center></td>
<td><center><?= $r1->fname; ?></center></td>
<td><center><?= $r1->address; ?></center></td>
<td><center><?= $r1->city; ?></center></td>
<td><center><?= $r1->age; ?></center></td>
<td><center><?= $r1->bgroup; ?></center></td>
<td><center><?= $r1->mno; ?></center></td>
<td><center><?= $r1->email; ?></center></td>
</tr>
<?php
}
?>
</table>
</div></center>
</div>
<div id="footer"><h4 align="center">copyright@myprojecthd</h4>
<p align="center"><a href="logout.php"><font
color="white">Logout</font></a></p>
</div>
</div>
</div>
</body>
</html>
C. SAMPLE INPUT