You are on page 1of 13

Project Report

Project Name Online Blood Donating System


Team Members
Zohaib Hassan BSEM-F17-010
Maham Amin BSEM-F17-049
M. Zeeshan BSEM-F17-160
Faiz-ur-Rehman BSEM-F17-039
Online Blood Donating System
Introduction:
This website provides a platform for blood donation system. By using this web site, we can add donor and
add request for blood this website helps the patients in critical situation or in emergency situation. We have
a separate section for donors where donor can register himself by using some of its personal details and we
have database linked to it where all data of donor is recorded. And in request section user can generate
request by adding few of its detail like patient contact and blood type. These requests are linked to donors
where each request linked to specific donor so that requester can have direct access to the donors.

Home page

Figure 1 Home Page

Add Donor page

Figure 2 add donor page


About page

Figure 3 about page

Code:
Home Page
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Revision</title>
<link rel="stylesheet" href="css/bootstrap.css">
<link rel="stylesheet" href="css/all.css">
<link rel="stylesheet" href="Style.css">
</head>
<body>
<nav class="navbar navbar-fixed-top">
<div class="navbar-logo">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#Navbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a href="" class="navbar-brand"><b>Blood Donor</b></a>
</div>
<div class="container-fluid">
<div id="Navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li><a href="">Home</a></li>
<li><a href="donor.html">Add Donor</a></li>
<li>
<a href="" class="dropdown-toggle" data-toggle="dropdown">More Info <span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="about%20us.html">About Us</a></li>
</ul>
</li>
</ul>
</div>
</div>
</nav>
<div id="homeSection">
<div class="dark-overlay">
<div class="container">
<div class="row">
<div class="col-sm-7 col-sm-offset-1">
<h1>Every <b>Blood Donor</b> is a life saver.</h1>
<br>
<p><i class="fa fa-check" aria-hidden="true"></i>&nbsp;&nbsp;&nbsp;&nbsp;Save Life</p>
<br>
<p><i class="fa fa-check" aria-hidden="true"></i>&nbsp;&nbsp;&nbsp;&nbsp;Stay Healthy</p>
<br>
<p><i class="fa fa-check" aria-hidden="true"></i>&nbsp;&nbsp;&nbsp;&nbsp;It makes you proud</p>

</div>
<br><br>
<div class="col-sm-4">
<form method="POST" class="form-vertical" id="homeForm" action="request.php">
<h1 class="text-center" title="Sign Up">Add Blood Request</h1>
<h5 class="text-center">Please fill out this form for blood request</h5>
<div class="form-group">
<input type="name" name="fullName" class="form-control" placeholder="Full name">
</div>
<div class="form-group">
<input type="text" name="city" class="form-control" placeholder="City">
</div>
<div class="form-group">
<input type="text" name="phoneNum" class="form-control" placeholder="Phone Number">
</div>
<div class="form-group">
<input type="text" name="cnic" class="form-control" placeholder="Cnic number">
</div>
<div class="form-group">
<input type="pass" name="age" class="form-control" placeholder="age">
</div>

<div class="form-group">
<div class="row">
<label for="bloodGroup" class="col-md-4 control-label">Select blood group</label>
<div class="col-md-8">
<select name="bloodGroup" id="bg" class="form-control">
<option value="">Select Blood Group</option>
<option value="">A+</option>
<option value="">A-</option>
<option value="">B+</option>
<option value="">B-</option>
<option value="">O+</option>
<option value="">O-</option>
<option value="">AB+</option>
<option value="">AB-</option>
</select>
</div>
</div>
</div>
<input type="submit" value="Submit" class="btn btn-default btn-block">
</form>
</div>
</div>
</div>
</div>
</div>
<section id="explore-Head-Section">
<div class="container">
<div class="row">
<div class="col-md-12 text-center">
<h1>Become A donor</h1>
<p>Healthy adults are able to donate blood and the procedure is safe and relatively painless.</p>
<a href="donor.html" target="_blank"><button type="button" class="btn btn-default">Add Donor</button></a>
</div>
</div>
</div>
</section>
<section id="explore-body-section">
<div class="container">
<div class="row">
<div class="col-md-6">
<img src="Images/explore-section1.jpg" alt="" class="img-responsive img-circle">
</div>
<div class="col-md-6">
<h3><b>Blood donor requirements</b></h3>
<p>Donors to the blood service must</p>
<p><i class="fa fa-check" aria-hidden="true"></i>&nbsp;&nbsp;&nbsp;&nbsp;Be healthy and not suffering from a cold, flu or other illness at the
time of donation </p>

<p><i class="fa fa-check" aria-hidden="true"></i>&nbsp;&nbsp;&nbsp;&nbsp;Be aged between 18 and 70 years (other rules may apply if you are a
current donor)</p>

<p><i class="fa fa-check" aria-hidden="true"></i>&nbsp;&nbsp;&nbsp;&nbsp;Meet guidelines designed to protect both the donor and the people
who will receive the blood.</p>

</div>
</div>
</div>
</section>

<section id="create-Section">
<div class="container">
<div class="row">
<div class="col-md-12 text-center">
<h1>Add Request</h1>
<p>To make it easier for blood banks and hospitals to maintain a stable blood supply, they now have the ability to create requests for blood on our
site.</p>

</div>
</div>
</div>

</section>
<section id="create-body-section">
<div class="container">
<div class="row">
<div class="col-md-6">
<h3><b>Blood Types</b></h3>
<p>The main types of blood donation include:</p>
<p><i class="fa fa-check" aria-hidden="true"></i>&nbsp;&nbsp;&nbsp;&nbsp;<b>Homologous donation</b>– a standard, whole-blood donation,
consisting of plasma, red and white blood cells, platelets, antibodies and other components</p>

<p><i class="fa fa-check" aria-hidden="true"></i>&nbsp;&nbsp;&nbsp;&nbsp;<b>Plasma donation</b> – also known as apheresis. Plasma is


separated from the other components by a special machine, and the red blood cells are returned to the donor in cycles throughout the donation </p>

<p><i class="fa fa-check" aria-hidden="true"></i>&nbsp;&nbsp;&nbsp;&nbsp;<b>Platelet donation </b>– known as platelet pheresis. This is done
in a similar way to plasma donation, but both the red cells and plasma are returned to the donor. </p>
</div>
<div class="col-md-6">
<img src="Images/create-section1.jpg" alt="" class="img-responsive img-circle">
</div>
</div>
</div>
</section>
<section id="share-Section">
<div class="container">
<div class="row">
<div class="col-md-12 text-center">
<h1>Donation of Blood</h1>
<p>Blood donation is safe for healthy adults. There’s no risk of contracting disease.</p>

</div>
</div>
</div>

</section>

<section id="share-body-section">
<div class="container">
<div class="row">
<div class="col-md-6">
<img src="Images/share-section1.jpg" alt="" class="img-responsive img-circle">
</div>
<div class="col-md-6">
<h3><b>Share what you care</b></h3>
<p>Donating blood has benefits for your emotional and physical health. According to a report by the Mental Health Foundation, helping others
can:</p>
<p><i class="fa fa-check" aria-hidden="true"></i>&nbsp;&nbsp;&nbsp;&nbsp;reduce stress</p>

<p><i class="fa fa-check" aria-hidden="true"></i>&nbsp;&nbsp;&nbsp;&nbsp;improve your emotional well-being</p>

<p><i class="fa fa-check" aria-hidden="true"></i>&nbsp;&nbsp;&nbsp;&nbsp;help get rid of negative feeling</p>


</div>
</div>
</div>
</section>
<footer id="myFooter">
<div id="myFooter1">
<div class="container">
<div class="row">
<div class="col-md-12 col-md-offset-5 col-xs-offset-3">
<img src="Images/facebook.png" alt="facebook" class="img-responsive">
<img src="Images/instagram.png" alt="instagram" class="img-responsive">
<img src="Images/twitter.png" alt="twitter" class="img-responsive">
<img src="Images/linkedin.png" alt="linkedin" class="img-responsive">
</div>
</div>

</div>
</div>
<div id="myFooter2">
<div class="container">
<div class="row">
<div class="col-md-12 text-center">
<h5>© 2019 Copyright <a href="">BloodDonor.com</a></h5>
</div>
</div>
</div>
</div>

</footer>
<script src="jquery-3.2.1.min.js"></script>
<script src="js/bootstrap.js"></script>

</body>

</html>

Add Donor Page


<!DOCTYPE html>

<html lang="">

<head>

<title>Add Donor</title>

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

<link rel="stylesheet" href="donor.css">


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

</head>

<body>

<nav class="navbar navbar-fixed-top">

<div class="navbar-logo">

<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#Navbar">

<span class="icon-bar"></span>

<span class="icon-bar"></span>

<span class="icon-bar"></span>

</button>

<a href="" class="navbar-brand"><b>Blood Donor</b></a>

</div>

<div class="container-fluid">

<div id="Navbar" class="collapse navbar-collapse">

<ul class="nav navbar-nav">

<li><a href="Project.html">Home</a></li>

<li><a href="donor.html">Add Donor</a></li>

<li>

<a href="" class="dropdown-toggle" data-toggle="dropdown">More Info <span class="caret"></span></a>

<ul class="dropdown-menu">

<li><a href="about%20us.html">About Us</a></li>

</ul>

</li>

</ul>

</div>

</div>

</nav>

<div class="well">

<div class="row">

<div class="col-md-12 text-center">

<h2>Add Donor</h2>

</div>

</div>

</div>

<div class="row">

<div class="col-md-6">
</div>

<div class="col-md-6">

<form action="connect.php" method="POST" class="form-horizontal">

<div class="row">

<div class="form-group">

<label for="firstname" class="col-md-4 control-label">First name</label>

<div class="col-md-4">

<input type="text" name="fName" class="form-control" placeholder="Enter first name">

</div>

</div>

</div>

<div class="row">

<div class="form-group">

<label for="lastname" class="col-md-4 control-label">Last name</label>

<div class="col-md-4">

<input type="text" name="lName" class="form-control" placeholder="Enter Last name">

</div>

</div>

</div>

<div class="row">

<div class="form-group">

<label for="city" class="col-md-4 control-label">City</label>

<div class="col-md-4">

<input type="text" name="city" class="form-control" placeholder="Enter City">

</div>

</div>

</div>

<div class="row">

<div class="form-group">

<label for="cnic" class="col-md-4 control-label">Cnic</label>

<div class="col-md-4">

<input type="text" name="cnic" class="form-control" placeholder="Enter Cnic">

</div>

</div>

</div>

<div class="row">

<div class="form-group">

<label for="phoneNum" class="col-md-4 control-label">Phone number</label>


<div class="col-md-4">

<input type="text" name="phoneNum" class="form-control" placeholder="Enter phone number">

</div>

</div>

</div>

<div class="row">

<div class="form-group">

<label for="bloodGroup" class="col-md-4 control-label">Select blood group</label>

<div class="col-md-4">

<select name="bloodGroup" id="bg" class="form-control">

<option value="">Select Blood Group</option>

<option value="A+">A+</option>

<option value="A-">A-</option>

<option value="B+">B+</option>

<option value="B-">B-</option>

<option value="O+">O+</option>

<option value="O-">O-</option>

<option value="AB+">AB+</option>

<option value="AB-">AB-</option>

</select>

</div>

</div>

</div>

<div class="row">

<div class="form-group">

<label for="dob" class="col-md-4 control-label">Select Date of Birth</label>

<div class="col-md-8">

<input type="date" name="DOB">

</div>

</div>

</div>

<div class="row">

<div class="form-group">

<label for="city" class="col-md-4 control-label">Select Last Donation Date</label>

<div class="col-md-8">

<input type="date" name="donationDate">

</div>

</div>

<div class="row">
<div class="col-md-offset-6">

<button class="btn btn-success">Submit</button>

</div>

</div>

</div>

</form>

</div>

</div>

<script src="jquery-3.2.1.min.js"></script>

<script src="js/bootstrap.js"></script>

</body>

</html>

About us Page
<!DOCTYPE html>

<html lang="">

<head>

<title>Add Donor</title>

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

<link rel="stylesheet" href="aboutus.css">

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

</head>

<body>

<nav class="navbar navbar-fixed-top">

<div class="navbar-logo">

<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#Navbar">

<span class="icon-bar"></span>

<span class="icon-bar"></span>

<span class="icon-bar"></span>

</button>

<a href="" class="navbar-brand"><b>Blood Donor</b></a>

</div>

<div class="container-fluid">

<div id="Navbar" class="collapse navbar-collapse">

<ul class="nav navbar-nav">

<li><a href="Project.html">Home</a></li>

<li><a href="donor.html">Add Donor</a></li>


<li>

<a href="" class="dropdown-toggle" data-toggle="dropdown">More Info <span class="caret"></span></a>

<ul class="dropdown-menu">

<li><a href="about%20us.html">About Us</a></li>

</ul>

</li>

</ul>

</div>

</div>

</nav>

<div class="well">

<div class="row">

<div class="col-md-12 text-center">

<h2>About US</h2>

</div>

</div>

</div>

<div class="row">

<h2 style="text-align: center">Our Mission</h2>

<p style="text-align:center ">

we promote the role of independent blood centers in providing life-saving blood components and recognize the continuous need for a safe and robust blood
supply.</p>

<h2 style="text-align: center">Our Core Values</h2>

<p style="text-align:center">

Blood donor Management System exists to:

</p>

<p style="text-align: center">

Advocate for laws and regulations recognizing the essential role that independent blood centers play in the healthcare system. <br>Promote partnerships,
policies and programs that increase awareness about the need for blood donation.<br>Serve as a thought-leader in the advancement of evidence-based medical and
scientific solutions related to health and safety.

</p>

</div>

<script src="jquery-3.2.1.min.js"></script>

<script src="js/bootstrap.js"></script>

</body>

</html>
Add Donor PHP
<?php

$con=new mysqli("localhost","root","","blooddonor");

$errno=mysqli_connect_errno();

if($errno)

$error=mysqli_connect_error();

echo "Connection Failed <br>";

echo "Error number = $errno <br>";

echo "Error = $error <br>";

else

$fName = $_POST['fName'];

$lName = $_POST['lName'];

$city = $_POST['city'];

$cnic = $_POST['cnic'];

$bloodGroup=$_POST['bloodGroup'];

$DOB=$_POST['DOB'];

$donationDate=$_POST['donationDate'];

$insert= " insert into donors(FirstName,LastName, City,Cnic,BloodGroup,DOB,DonationDate)


Values('$fName','$lName','$city','$cnic','$bloodGroup','$DOB','$donationDate')";

if(mysqli_query($con,$insert))

include('thankyou.html');

else

echo "Error While Inserting the Data";

?>
Request Page
<?php

$con=new mysqli("localhost","root","","blooddonor");

$errno=mysqli_connect_errno();

if($errno)

$error=mysqli_connect_error();

echo "Connection Failed <br>";

echo "Error number = $errno <br>";

echo "Error = $error <br>";

else

$fName = $_POST['fullName'];

$city = $_POST['city'];

$phone = $_POST['phoneNum'];

$cnic = $_POST['cnic'];

$age = $_POST['age'];

$bloodGroup=$_POST['bloodGroup'];

$insert= " insert into requests(Name,city,Phone,Cnic,BloodGroup) Values('$fName','$city','$phone','$cnic','$bloodGroup')";

if(mysqli_query($con,$insert))

echo "Request Generated Successfully";

else

echo "Error While Inserting the Data";

?>

You might also like