You are on page 1of 52

VISVESVARAYA TECHNOLOGICAL UNIVERSITY

Jnana Sangama, Belagavi – 590018

A DBMS (18CSL58) MINI PROJECT REPORT


ON

"DOCTOR APPOINTMENT SYSTEM”


Submitted in partial fulfillment of the requirement of the 5th semester

BACHELOR OF ENGINEERING
In
COMPUTER SCIENCE & ENGINEERING
For the academic year
2020-2021

Submitted by:

DIWAKAR KARN 1KN18CS030


MUKUNDA PD. UPADHYAYA 1KN18CS067

Under the Guidance of

Mrs. Mohammed Ziaulla


Asst. Professor Dept. of CSE
KNSIT, Bengaluru-64

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

K.N.S INSTITUTE OF TECHNOLOGY


Thirumenahalli, Yelahanka, Bengaluru-560064
K.N.S INSTITUTE OF TECHNOLOGY
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

CERTIFICATE
This is to certify that the technical Project Work entitled “DOCTOR
APPOINTMENT SYSTEM” is a bonafide work carried out by Mr. DIWAKAR KARNA (1KN18CS030)
AND Mr. MUKUNDA PD. UPADHYAYA (1KN18CS067) in partial fulfillment for the award of
Bachelor of Engineering in Computer Science Engineering under Visvesvaraya Technological
University, Belgavi, during the year 2020-2021. It is certified that all corrections/suggestions given for
Internal Assessment have been incorporated in the report. This Project report has been approved as it
satisfies the academic requirements in aspects of project work prescribed for the said degree.

Signature of Guide Signature of HOD


Mr. Mohammed Ziaulla Mr. Mohamed Shakir
Asst. Professor Professor & HOD
Dept. of CSE, Dept. of CSE,
KNSIT, Bangalore KNSIT, Bangalore

INTERNAL EVALUATION

External Viva
Signature with Date
Name of the Examiners

1.

2.
ACKNOWLEDGEMENT

We would like to express our gratitude to Dr. S. M Prakash, Principal,


KNSIT Bangalore, for providing us congenial environment to work in.

We would like to express our profound thanks to our HOD Mr. Mohamed
Shakir for his support and encouragement towards us at every stage in successful
completion of our project.

The satisfaction and euphoria that accompanies the successful completion of any task
would be incomplete without mentioning the people who made it possible. If there is a
driving force that kept us going on in doing this project, it is the constant support of our guide
Mr. Mohammed Ziaulla. We present our sincere and heartiest thanks for giving us a patient
hearing and clearing our doubts.

We place our gratitude to our parents who always encouraged us to pursue our
interests, who have led onto the right path. We are undoubted for all the love and affection
they bestowed upon us, many are responsible for the knowledge and experience we have
gained during our project and throughout the course. With profound sense of gratitude
and regards we acknowledge the support extended by our friends in completion of the project.

Finally, we would like to thank all those to knowingly or unknowingly helped us


throughout our project.

DIWAKAR KARNA 1KN18CS030

MUKUNDA PD. UPADHYAYA 1KN18CS067


Doctor Appointment System 2020-21

TABLE OF CONTENTS

INTRODUCTION ………………………………………………………………………….2

OBJECTIVE ………………………………………………………………………………..2

OVERVIEW ………………………………………………………………………………..2

FEATURES ……………………………………………………………………………….... 2

FEATURES FOR ADMIN………………………………………………………….2

FEATURES FOR DOCTOR………………………………………………………..3

FEATURES FOR PATIENTS………………………………………………………3

ER DIAGRAM ……………………………………………………………………………...4

SOURCE CODE …………………………………………………………………………….5

APPLICATION LAYER ……………………………………………………………..............5

DATA LAYER ………………………………………………………………………17

PRESENTATION LAYER ………………………………………………………….............22

TECHNOLOGIES USED …………………………………………………………………...46

HARDWARE REQUIREMENTS …………………………………………………………..46

CONCLUSION ………………………………………………………………………………47

BIBLOGRAPHY ……………………………………………………………………………..48
Doctor Appointment System 2020-21

Introduction
The “Doctor Appointment System” is a web-based application, which
allows patients to Book a Doctor based on their specialization. As we know the
problems and difficulties faced by a patient while booking a Doctor. Patients has
to stand on queue to book an appointment with his desired doctor. If the doctor
isn’t present at that day he has to return.
Basically, it is troublesome act to book, enquire, and wait for a doctor, for a
patient who is seriously ill. This application not only allows a patient to book a
doctor but to check availability dates, prescribed medicines, their treatment
history and other features. It also allows a doctor to keep track on their patients
according to their visits and upcoming appointments with their respective
patients. This application ultimately cuts down the barrier which stands in
between a Doctor andPatients.

Objective
To Provide a better, reliable, and durable means of communication
between Doctor and Patient.

Overview
The Project can be used Medical Institutions, Clinics, Hospitals,
Pharmacies and other Medicine related field according to its need. This
application mainly consists of three sections namely, Admin, Doctor and Patient.
Various Functionalities and Features offered to a particular entity is discussed in
the Features Section.

Features
Features for Admin
 Add Doctor Based on Specialization such as Heart, Bones

 View Doctors

 View Patients

 View Appointments

 Search for Organ Donors in Patients List

 Access the Feedback Section, to review the doctors or


patient’s opinions, complaints, improvements etc.

Dept. Of CSE Page 2


Doctor Appointment System 2020-21

Features for Doctors


 Access their Profile

 View their upcoming appointments

 Search for a Patient

 Add Description

Features for Patients


 Sign In/ Sign Up

 See their Information

 Book appointments with Doctor according

theirspecialization/field of Study

 View their appointments

 Cancel Booking

 Donate an Organ

 Search for a Donor

Software Req uirements


Any Browser running on Chromium V8 engine like Google
chrome, or Microsoft Edge. Preferred Windows XP/7/8/8.1/10
Operating Systems can be used.

Dept. Of CSE Page 3


Doctor Appointment System Doctor Appointment System 2020-21

ER Diagram

Phone No. Nam


e
Passwor
Blood group d
Password Specializatio
n
UserI
d

ID
Patient
Doctor

Addres
Phone

Patient
Name
Address

Schedule
Have

Date Time

Appoint

Dept. Of CSE Page 4


Doctor Appointment System 2020-21

SOURCE CODE
APPLICATION LAYER

<?php include('../datalayer/server.php'); ?>


<!DOCTYPE html>
<html>
<head>
<title>Patient</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div class="header">
<h2>Register</h2>
</div>
<form method="post" action="1st.php" enctype="multipart/form-data">
<?php include ('../datalayer/errors.php'); ?>
<div class="input-group">
<label>User ID</label>
<input type="text" name="UserID" >
</div>
<div class="input-group">
<label>Name</label>
<input type="text" name="Name" >
</div>
<div class="input-group">

Dept. Of CSE Page 5


Doctor Appointment System 2020-21

<label>Address</label><input type="text"
name="Address"</div><div class="input-group">
<label>Contact Number</label>
<input type="text" name="ContactNumber"
</div>
<div class="input-group">
<label>Email address</label>
<input type="text" name="Email">
</div>
<div class="input-group">
<label>Password</label>
<input type="text" name="password">
</div>
<div class="input-group">
<label>Blood type</label>
<input type="text" name="bloodtype">
</div>
<div class="input-group">
<button type="submit" name="Register" class="btn">Register</button>
</div> <p>
Already a member? <a href="login.php">Sign in </a></p>
</form>
</body>
</html>
doctorpatient.css
html,body{
margin-top: 0; padding: 0;width: 100%;}

Dept. Of CSE Page 6


Doctor Appointment System 2020-21

body{
height: 100vh;background: #151519;}
.buttonA{
position: absolute;
top: 65%;
left: 50%;
transform: translate(-50%,-50%);
}
.buttonA{
background: none;
color: #ccc;
width: 240px;
height: 80px;
border:3px solid #992828;
font-size: 25px;
border-radius: 4px;
transition: .6s;
overflow: hidden;

}
.buttonA:focus{
outline: none;
}
.buttonA:before{
content: '';
display: block;

Dept. Of CSE Page 7


Doctor Appointment System 2020-21

position: absolute;
background: #992828;
width: 60px;
height: 100%;
left: 0;
top: 0;
opacity: .5;
filter:
blur(30px);
transform: translateX(-130px) skewX(-15deg);
}
.buttonA:after{
content: ''; display:
block; position:
absolute;
background: #992828;
width: 30px;
height: 100%;
left: 30px;
top: 0;
opacity: 0;
filter: blur(30px);
transform: translateX(-100px) scaleX(-15deg);
}
.buttonA:hover:before {
transform: translateX(300px) skewX(-
15deg); opacity: .6;

Dept. Of CSE Page 8


Doctor Appointment System 2020-21

transition: .7s;
}
.buttonA:hover:after {
transform: translateX(300px) skewX(-
15deg); opacity: 1;
transition: .7s;
}
.buttonA:hover {
background: #992828;
cursor: pointer;
}
.buttonP{
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
}
.buttonP{
background: none;
color: #ccc;
width: 240px;
height: 80px;
border:3px solid #39ca74;
font-size: 25px;
border-radius: 4px;
transition: .6s;

Dept. Of CSE Page 9


Doctor Appointment System 2020-21

overflow: hidden;
}
.buttonP:focus{
outline: none;
}
.buttonP:before{
content: ''; display:
block; position:
absolute;
background: #39ca74;
width: 60px;
height: 100%;
left: 0;
top: 0;
opacity: .5;
filter:
blur(30px);
transform: translateX(-130px) skewX(-15deg);
}
.buttonP:after{
content: ''; display:
block; position:
absolute;
background: #39ca74;
width: 30px;
height: 100%;
left: 30px;

Dept. Of CSE Page 10


Doctor Appointment System 2020-21

top: 0;
opacity: 0;
filter: blur(30px);
transform: translateX(-100px) scaleX(-15deg);
}
.buttonP:hover:before {
transform: translateX(300px) skewX(-
15deg); opacity: .6;
transition: .7s;
}

.buttonP:hover:after {
transform: translateX(300px) skewX(-
15deg); opacity: 1;
transition: .7s;
}
.buttonP:hover {
background: #39ca74;
cursor: pointer;
}
.buttonD{
position: absolute;
top: 35%;
left: 50%;
transform: translate(-50%,-50%);
}

Dept. Of CSE Page 11


Doctor Appointment System 2020-21

.buttonD{
background: none;
color: #ccc;
width: 240px;
height: 80px;
border:3px solid #423289;
font-size: 25px;
border-radius: 4px;
transition: .6s;
overflow: hidden;
}
.buttonD:focus{
outline: none;
}
.buttonD:before{
content: ''; display:
block; position:
absolute;
background: #423289;
width: 60px;
height: 100%;
left: 0;
top: 0;
opacity: .5;
filter:
blur(30px);
transform: translateX(-130px) skewX(-15deg);

Dept. Of CSE Page 12


Doctor Appointment System 2020-21

}
.buttonD:after{
content: ''; display:
block; position:
absolute;
background: #423289;
width: 30px;
height: 100%;
left: 30px;
top: 0;
opacity: 0;
filter: blur(30px);
transform: translateX(-100px) scaleX(-15deg);
}
.buttonD:hover:before {
transform: translateX(300px) skewX(-
15deg); opacity: .6;
transition: .7s;
}
.buttonD:hover:after {
transform: translateX(300px) skewX(-
15deg); opacity: 1;
transition: .7s;
}
.buttonD:hover {
background: #423289;

Dept. Of CSE Page 13


Doctor Appointment System 2020-21

cursor: pointer;
}

Doctorpatient.php
<!DOCTYPE html>
<html>
<head>
<title>Doctor Patient</title>
<link rel="stylesheet" href="doctorpatient.css">
<link
href="https://fonts.googleapis.com/css2?family=Alfa+Slab+One&family=Open+Sans:wght@300
&display=swap" rel="stylesheet">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<meta http-equiv="X-UA-Compatible" content="id=edge">
</head>
<body>
<div class="wrapper">
<div class="btn" > <a href="login3.php">
<button type="button" class="buttonA" > Admin</button>
</div>
</div>
<div class="wrapper" style="text-decoration: none;">
<div class="btn" > <a href="login.php" >
<button type="button" class="buttonP">Patient</button>
</div>
</div>
<div class="wrapper" style="text-decoration: none;">

Dept. Of CSE Page 14


Doctor Appointment System 2020-21

<div class="btn" > <a href="login2.php" >


<button type="button" class="buttonD">Doctor</button>
</a>
</div></div>
</body>
</html>

Login.php
<?php include('../datalayer/server.php') ?>
<!DOCTYPE html>
<html>
<head>
<title>Patient</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div class="header">
<h2>Patient Login</h2>
</div>
<form method="post" action="login.php">
<?php include ('../datalayer/errors.php')?>
<div class="input-group">
<label>User ID</label>
<input type="text" name="UserID">
</div>
<div class="input-group">
<label>Password</label>

Dept. Of CSE Page 15


Doctor Appointment System 2020-21

<input type="Password" name="password">


<div class="input-group">
<button type="submit" name="Login" class="btn"> Login</button>
</div>
<p>
Not a member? <a href="1st.php">Sign Up </a>
</p>
</form>
</body>
</html>

Login2.php
<?php include('../datalayer/server.php') ?>

<!DOCTYPE html>
<html>
<head>
<title>Doctor</title>
<link rel="stylesheet" type="text/css" href="style3.css">
</head>
<body class="Dbody">
<div class="Dheader">
<h2>Doctor Login</h2>
</div>
<form method="post" action="login2.php" class="Dform">
<?php include ('../datalayer/errors.php')?>
<div class="input-groupD">

Dept. Of CSE Page 16


Doctor Appointment System 2020-21

<label>Doctor ID</label>
<input type="text" name="doctorID">
</div>
<div class="input-groupD">
<label>Password</label>
<input type="Password" name="doctorpassword">
<div class="input-groupD">
<button type="submit" name="Login2" class="btnD"> Login</button>
</div>
</form>
</body>
</html>

DATA LAYER

SET SQL_MODE =
"NO_AUTO_VALUE_ON_ZERO"; SET
AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";

CREATE TABLE `admin` (


`AdminID` varchar(11) NOT NULL,
`adminpassword` varchar(30) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

Dept. Of CSE Page 17


Doctor Appointment System 2020-21

CREATE TABLE `bookapp` (


`AppoID` int(11) NOT NULL,
`Date` date NOT NULL,
`Time` time NOT NULL,
`patientID` int(11) NOT NULL,
`docID` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

CREATE TABLE `description` (


`X` int(11) NOT NULL,
`descID` int(11) NOT NULL,
`descName` varchar(30) NOT NULL,
`treatment` varchar(50) NOT NULL,
`Note` varchar(200) NOT NULL,
`doctorIDdesc` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

CREATE TABLE `doctor` (


`DoctorID` int(11) NOT NULL,
`Doctorname` varchar(255) NOT NULL,
`email` varchar(50) NOT NULL,
`Address` varchar(255) NOT NULL,
`ContactNumber` varchar(255) NOT NULL,
`password` varchar(255) NOT NULL,
`categorey` varchar(255) NOT NULL

Dept. Of CSE Page 18


Doctor Appointment System 2020-21

) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

CREATE TABLE `donor` (


`donarID` int(11) NOT NULL,
`donarname` varchar(50) NOT NULL,
`donaraddress` varchar(50) NOT NULL,
`donarnumber` varchar(40) NOT NULL,
`donaremail` varchar(50) NOT NULL,
`donarblood` varchar(11) NOT NULL,
`organ` varchar(20) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

CREATE TABLE `feedback` (


`pID` int(11) NOT NULL,
`feedback` varchar(200) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

CREATE TABLE `patients` (


`UserID` int(11) NOT NULL,
`Name` varchar(255) NOT NULL,
`Address` varchar(255) NOT NULL,
`ContactNumber` varchar(40) NOT NULL,
`Email` varchar(255) NOT NULL,
`Password` varchar(255) NOT NULL,
`Bloodtype` varchar(10) NOT NULL

Dept. Of CSE Page 19


Doctor Appointment System 2020-21

) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

ALTER TABLE `admin`


ADD UNIQUE KEY `AdminID` (`AdminID`);

ALTER TABLE `bookapp`


ADD PRIMARY KEY (`AppoID`),
ADD UNIQUE KEY `Time`
(`Time`), ADD KEY `patientoapp`
(`patientID`), ADD KEY
`doctopatient` (`docID`);

ALTER TABLE
`description` ADD
PRIMARY KEY (`X`),
ADD KEY `descpatientID` (`descID`),
ADD KEY `descDoctorID` (`doctorIDdesc`);

ALTER TABLE `doctor`


ADD PRIMARY KEY (`DoctorID`);

ALTER TABLE `donor`


ADD PRIMARY KEY (`donarID`);

ALTER TABLE `feedback`


ADD UNIQUE KEY `feedback_2`
(`feedback`), ADD KEY `feedback` (`pID`);

Dept. Of CSE Page 20


Doctor Appointment System 2020-21

ALTER TABLE `patients`


ADD PRIMARY KEY (`UserID`);

ALTER TABLE `bookapp`


MODIFY `AppoID` int(11) NOT NULL AUTO_INCREMENT;

ALTER TABLE `description`


MODIFY `X` int(11) NOT NULL AUTO_INCREMENT;

ALTER TABLE `doctor`


MODIFY `DoctorID` int(11) NOT NULL AUTO_INCREMENT;

ALTER TABLE `donor`


MODIFY `donarID` int(11) NOT NULL AUTO_INCREMENT;

ALTER TABLE `patients`


MODIFY `UserID` int(11) NOT NULL AUTO_INCREMENT;

ALTER TABLE `bookapp`


ADD CONSTRAINT `doctopatient` FOREIGN KEY (`docID`) REFERENCES `doctor`
(`DoctorID`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `patientoapp` FOREIGN KEY (`patientID`) REFERENCES `patients`
(`UserID`) ON DELETE CASCADE ON UPDATE CASCADE;

ALTER TABLE `description`

Dept. Of CSE Page 21


Doctor Appointment System 2020-21

ADD CONSTRAINT `descDoctorID` FOREIGN KEY (`doctorIDdesc`)


REFERENCES `doctor` (`DoctorID`) ON DELETE CASCADE ON UPDATE
CASCADE,
ADD CONSTRAINT `descpatientID` FOREIGN KEY (`descID`) REFERENCES `patients`
(`UserID`) ON DELETE CASCADE ON UPDATE CASCADE;

ALTER TABLE `feedback`


ADD CONSTRAINT `feedback` FOREIGN KEY (`pID`) REFERENCES `patients`
(`UserID`) ON DELETE CASCADE ON UPDATE CASCADE;
COMMIT;

PRESENTATION LAYER
ADMIN
Feedback.php
<?php include '../../datalayer/bookserver.php'; ?>
<!DOCTYPE html>
<html>
<head>
<title>Admin</title>
<link rel="stylesheet" href="style5.css">
<link
href="https://fonts.googleapis.com/css2?family=Alfa+Slab+One&family=Open+Sans:wght@300&display=
swap" rel="stylesheet">
</head>

<header>
<h1>Doctor<span>Patient</span></h1>
<nav>
<ul>
<li><a href="index3.php">Add/Delete Doctor</a></li>
<li><a href="viewdoctor.php">View Doctors</a></li>
<li><a href=" viewpatients.php">View Patients</a></li>
<li><a href="viewappointments.php">View Appointments</a></li>
<li><a href="searchdonoradmin.php">Search Donor</a></li>
<li><a href="feedback.php">FeedBack</a></li>
<li><a href="../../applicationlayer/Doctorpatient.php">Logout</a></li>
</ul>
</nav>
</header>
<body>
<h1 style="margin-left:35% ;margin-top:80px" class="asd">Patients FeedBack</h1>
<table class="table4" style="width: 100%">
<tr>
<th>Patient ID</th>
<th>Patient Name</th>
<th>FeedBack</th>
Dept. Of CSE </tr> Page 22
Doctor Appointment System 2020-21

<?php $sql3="SELECT * FROM patients,feedback WHERE pID=UserID " ;


$result3=$mysqli->query($sql3);
if(mysqli_num_rows($result3)>=1){
while ($row3=$result3->fetch_assoc()) {
echo
"<tr><td>".$row3["pID"]."</td><td>".$row3["Name"]."</td><td>".$row3['feedback']."</td></tr>";
}
echo "</table";
}
?>
</table>
</body>
</html>
Index3.php
<?php include ('../../datalayer/bookserver.php'); ?>
<!DOCTYPE html>
<html>
<head>
<title>Admin</title>
<link rel="stylesheet" href="style5.css" type="text/css">

<link
href="https://fonts.googleapis.com/css2?family=Alfa+Slab+One&family=Open+Sans:wght@300&display=
swap" rel="stylesheet">
</head>

<header>
<h1>Doctor<span>Patient</span></h1>
<nav>

<ul>
<li><a href="index3.php">Add/Delete Doctor</a></li>
<li><a href="viewdoctor.php">View Doctors</a></li>
<li><a href=" viewpatients.php">View Patients</a></li>
<li><a href="viewappointments.php">View Appointments</a></li>
<li><a href="searchdonoradmin.php">Search Donor</a></li>
<li><a href="feedback.php">FeedBack</a></li>
<li><a href="../../applicationlayer/Doctorpatient.php">Logout</a></li>
</ul>
</nav>
</header>
<body>
<div class="headerA">
<h2>Add Doctor</h2>
</div>
<form method="post" action="index3.php">
<?php include ('../../datalayer/errors.php'); ?>
<div class="input-groupA">
<label>Doctor ID</label>
<input type="text" name="addID" >
</div>
<div class="input-groupA">
<label>Doctor Name</label>
<input type="text" name="addname" >
Dept. Of CSE </div> Page 23
Doctor Appointment System 2020-21

<div class="input-groupA">
<label>Address</label>
<input type="text" name="addAddress">
</div>
<div class="input-groupA">
<label>Contact Number</label>
<input type="text" name="addContactNumber">
</div>
<div class="input-groupA">
<label>Email address</label>
<input type="text" name="addEmail">

</div>

<div class="input-groupA">
<label>Password</label>
<input type="text" name="addpassword">

</div>
<div class="input-groupA">
<label>Category</label>
<select name="addcategory" class="xd">
<option value="bone" >bones</option>
<option value="heart">heart</option>
<option value="Dentistry">Dentistry</option>
<option value="MentalHealth">Mental Health</option>
<option value="Surgery">Surgery</option>
</select>
</div>
<div class="input-groupA">
<button type="submit" name="Add" class="btnA">Add Doctor</button>
</div>
</form>
<div class="headerAD">
<h2>Delete Doctor</h2>
</div>
<form method="post" action="index3.php" class="delete">
<div class="input-groupA">
<label>Doctor ID</label>
<input type="text" name="deleteID" >
</div>
<div class="input-groupA">
<button type="submit" name="Delete" class="btnA">Delete</button>
</div>
</form>
</body>
</html>
Searchdonoradmin.php
<?php include ('../../datalayer/bookserver.php'); ?>
<!DOCTYPE html>
<html>
<head>
<title>Admin</title>
<link rel="stylesheet" href="style5.css" type="text/css">
Dept. Of CSE <link Page 24
Doctor Appointment System 2020-21

href="https://fonts.googleapis.com/css2?family=Alfa+Slab+One&family=Open+Sans:wght@300&display=
swap" rel="stylesheet">
</head>
<header>
<h1>Doctor<span>Patient</span></h1>
<nav>
<ul>
<li><a href="index3.php">Add/Delete Doctor</a></li>
<li><a href="viewdoctor.php">View Doctors</a></li>
<li><a href=" viewpatients.php">View Patients</a></li>
<li><a href="viewappointments.php">View Appointments</a></li>
<li><a href="searchdonoradmin.php">Search Donor</a></li>
<li><a href="feedback.php">FeedBack</a></li>
<li><a href="../../applicationlayer/Doctorpatient.php">Logout</a></li>
</ul>
</nav>
</header>
<body>
<form method="post" action="searchdonoradmin.php" class="searchdonor">
<?php include ('../../datalayer/errors.php') ;?>
<div class="input-group">
<label style="font-weight: bold;">Search By:<br>*Blood Group<br>*Organ </label>
<input type="text" name="dID3" >
</div>
<div class="input-group">
<button type="submit" name="SearchD" class="btnA" style="padding: 5px;margin-left:
90px;margin-top: 20px; padding-left: 15px; padding-right: 15px">Search</button>
</div>
</form>
</form>
<?php

if (isset($_POST['SearchD'])) {

?><table class="table2">
<tr>
<th>DonorID</th>
<th>DonorName</th>
<th>DonorAddress</th>
<th>DonorContactNumber</th>
<th>DonorEmail</th>
<th>DonorBloodGroup</th>
<th>DonorOrgan</th>
</tr> <?php
$dID3 =$mysqli -> real_escape_string($_POST['dID3']);
$sql8="SELECT * FROM donor WHERE donarblood=('$dID3') OR organ=('$dID3') ";
$result8=$mysqli->query($sql8);
if(mysqli_num_rows($result8)>=1){
while ($row8=$result8->fetch_assoc()) {
echo
"<tr><td>".$row8["donarID"]."</td><td>".$row8["donarname"]."</td><td>".$row8["donaraddress"]."</td
><td>".$row8["donarnumber"]."</td><td>".$row8['donaremail']."</td><td>".$row8['donarblood']."</td><t
d>".$row8['organ']."</td></tr>";
}
Dept. Of CSE Page 25
Doctor Appointment System 2020-21

echo "</table";
}
}?>
</table>
</body>
</html>
Viewappointments.php
<?php include '../../datalayer/bookserver.php'; ?>
<!DOCTYPE html>
<html>
<head>
<title>Admin</title>
<link rel="stylesheet" href="style5.css">
<link
href="https://fonts.googleapis.com/css2?family=Alfa+Slab+One&family=Open+Sans:wght@300
&display=swap" rel="stylesheet">
</head>
<header>
<h1>Doctor<span>Patient</span></h1>
<nav>
<ul>
<li><a href="index3.php">Add/Delete Doctor</a></li>
<li><a href="viewdoctor.php">View Doctors</a></li>
<li><a href=" viewpatients.php">View Patients</a></li>
<li><a href="viewappointments.php">View Appointments</a></li>
<li><a href="searchdonoradmin.php">Search Donor</a></li>
<li><a href="feedback.php">FeedBack</a></li>
<li><a href="../../applicationlayer/Doctorpatient.php">Logout</a></li>
</ul>
</nav>
</header>
<body>
<h1 style="margin-left:40% ;margin-top:80px" class="asd"> Appointments </h1>
<table class="table4">
<tr>
<th>Appointments ID</th>
<th>Doctor ID</th>
<th>Patient ID</th>
<th>Date</th>
<th>Time</th>
</tr>
<?php $sql3="SELECT * FROM bookapp " ;
$result3=$mysqli->query($sql3);
if(mysqli_num_rows($result3)>=1){
while ($row3=$result3->fetch_assoc()) {
echo
"<tr><td>".$row3["AppoID"]."</td><td>".$row3["docID"]."</td><td>".$row3["patientID"]."</td
><td>".$row3["Date"]."</td><td>".$row3['Time']."</td></tr>";
}
echo "</table";
Dept. Of CSE } Page 26
Doctor Appointment System 2020-21

?>

</table>
<h1 style="margin-left:37% ;margin-top:70px" class="asd">Send Confirmation Email
</h1>

<form role="form" method="post" enctype="multipart/form-data" class="form1" style="width:


100%;margin-top:110px;margin-left: -10px;">

<div classs="xa" style="margin-top:0px">


<label for="email" style="width:40px;">Email</label>
<input type="email" id="email" name="email" maxlength="50" style="width:400px;"
placeholder="XAXAXA@gmail.com">

<label for="subject" style="margin:10px ;display: inline-block;">Subject</label>


<input type="text" id="subject" name="subject" maxlength="50" style="width:400px;"
placeholder="Appointment Confirmation">

<label for="name" style="margin:10px ;display:inline-block;" >Message</label>


<input type="text" placeholder="this is a Confirmation email for your appointment ID:"
type="textarea" id="message" name="message" rows="1" style="width:400px;padding-top: 10px"
maxlength="2000">
<button type="submit" id="message" name="sendemail"
style="width:200px;height:30px;border-radius: 10px; background: #992828 ;margin-
left:45%;color: white ">Send
</button>

</div>
</form>

<?php
if (isset($_POST['sendmail'])){
if(mail($_POST['email'], $_POST['subject'],
$_POST['message'],'FROM:gassermohsen83@gmail.com')){
echo "success";
}else{
echo "failed";
}
}

?>
</body>
</html>
DOCTOR
add.php
<?php include ('../../datalayer/bookserver.php'); ?>
<!DOCTYPE html>
Dept. Of C<ShEtml> Page 27
Doctor Appointment System 2020-21

<head>
<title>Doctor</title>
<link rel="stylesheet" href="style3.css">

<link
href="https://fonts.googleapis.com/css2?family=Alfa+Slab+One&family=Open+Sans:wght@300&display=
swap" rel="stylesheet">
</head>

<header>
<h1>Doctor<span>Patient</span></h1>
<nav>
<ul>
<li><a href="index2.php">My Info</a></li>
<li><a href="doctorapp.php">My Appointments</a></li>
<li><a href="searchpatient.php">Search Patient</a></li>
<li><a href="add.php">Add Description</a></li>
<li><a href="../../applicationlayer/Doctorpatient.php">Logout</a></li>
</ul>
</nav>
</header>

<form method="post" action="add.php" class="add">


<form action="<?php echo $_SERVER['PHP_SELF'];?>" method="post">
<div class="input-group">
<label style="font-weight: bold;">PatientID</label>
<input type="text" name="Patientsearch" class="xd"
</div>
<div class="input-group">
<button type="submit" name="SearchPA" class="btn">Search</button>
</div>
<?php
if (isset($_POST['SearchPA'])) {

$Patientsearch = mysqli_real_escape_string($mysqli,$_POST['Patientsearch']);

$query="SELECT * FROM patients WHERE UserID=('$Patientsearch')";


$result2=mysqli_query($mysqli,$query);
while ($row2=mysqli_fetch_assoc($result2)) {
?>
<div class="input-group">
<label>Patient ID</label>
<input type="text" name="descID" value="<?php echo $row2['UserID']; ?>">
</div>
<div class="input-group">
<label>Name</label>
<input type="text" name="descName" value="<?php echo $row2['Name']; ?>">
</div>
<div class="input-group">
<label>Treatment</label>
<input type="text" name="Treatment">
</div>
<div class="input-group-add">
<label>Note</label>
Dept. Of CSE <input style="" type="text" name="Note"> Page 28
Doctor Appointment System 2020-21

</div>
<div class="input-group">
<button type="submit" name="AddD" class="btn">Add</button>
</div>
<?php
}
?>
</div>
<?php
}
?>
<?php
if (isset($_POST['AddD'])) {
include ('../../datalayer/errors.php');
$errors=array();

$descID = $mysqli -> real_escape_string($_POST['descID']);


$descName = $mysqli -> real_escape_string($_POST['descName']);
$treatment = $mysqli -> real_escape_string($_POST['Treatment']);
$note = $mysqli -> real_escape_string($_POST['Note']);
if (empty($treatment)) {
array_push($errors,"Treatment is required");
# code...
}
if (empty($note)) {
array_push($errors,"Your note is required");
# code...
}
if(count($errors)==0)
$sql7 = "INSERT INTO description (descID,descName,treatment,note,doctorIDdesc) VALUES
('$descID','$descName','$treatment','$note','$doctorprofile') ";
if ($mysqli -> query($sql7)) { ?>
<h2 class="thanks"> <?php printf("Your Description Is Added",$mysqli->affected_rows);?></h2>
<?php
}
}
}
?>
</form>
</body>
</html>
Doctorapp.php
<?php include '../../datalayer/bookserver.php '; ?>
<!DOCTYPE html>
<html>
<head>
<title>Doctor</title>
<link rel="stylesheet" href="style3.css">
<link
href="https://fonts.googleapis.com/css2?family=Alfa+Slab+One&family=Open+Sans:wght@300&display=
swap" rel="stylesheet">
</head>
<header>
<h1>Doctor<span>Patient</span></h1>
Dept. Of CSE <nav> Page 29
Doctor Appointment System 2020-21

<ul>
<li><a href="index2.php">My Info</a></li>
<li><a href="doctorapp.php">My Appointments</a></li>
<li><a href=" searchpatient.php">Search Patient</a></li>
<li><a href="add.php">Add Description</a></li>
<li><a href="../../applicationlayer/Doctorpatient.php">Logout</a></li>
</ul>
</nav>
</header>
<body>
<h1 class="my1">My<span class="mys">Appointments</span></h1>
<table class="table2">
<tr>
<th>Appointment ID</th>
<th>DATE</th>
<th>TIME</th>
<th>PatientID</th>
<th>PatientName</th>
<th>PatientAddress</th>
<th>PatientEmail</th>
<th>PatientContactNumber</th>
<th>BloodGroup</th>
</tr>
<?php $sqldoc="SELECT * FROM bookapp , patients WHERE docID=('$doctorprofile')
AND patientID=UserID " ;
$resultdoc=$mysqli->query($sqldoc);
if(mysqli_num_rows($resultdoc)>= 1){
while ($rowdoc=$resultdoc->fetch_assoc()) {
echo
"<tr><td>".$rowdoc["AppoID"]."</td><td>".$rowdoc["Date"]."</td><td>".$rowdoc["Time"]."</td><td>".
$rowdoc["UserID"]."</td><td>".$rowdoc['Name']."</td><td>".$rowdoc['Address']."</td><td>".$rowdoc['
Email']."</td><td>".$rowdoc["ContactNumber"]."</td><td>".$rowdoc["Bloodtype"]."</td></tr>";
}
echo "</table";
}
?>
</table>
</body>
</html>
Index2.php
<?php include ('../../datalayer/server.php'); ?>
<!DOCTYPE html>
<html>
<head>
<title>Doctor</title>
<link rel="stylesheet" href="style3.css">
<link
href="https://fonts.googleapis.com/css2?family=Alfa+Slab+One&family=Open+Sans:wght@300&display=
swap" rel="stylesheet">
</head>
<header>
<h1 >Doctor<span>Patient</span></h1>
<nav>
<ul >
Dept. Of CSE <li><a href="index2.php">MyInfo</a></li> Page 30
Doctor Appointment System 2020-21

<li><a href="doctorapp.php">My Appointments</a></li>


<li><a href=" searchpatient.php">Search Patient</a></li>
<li><a href="add.php">Add Description</a></li>
<li><a href="../../applicationlayer/Doctorpatient.php">Logout</a></li>
</ul>
</nav>
</header>
<body >

<div class="header">
<h2>My Information</h2>
</div>
<form method="post" action="index2.php" class="info">
<div class="Dcontent">
<label>ID: <?php echo "" .isset($_SESSION['DoctorID']);?></label>

<br>
<br>
<label> Email : <?php echo $colD['email']; ?></label>
<br>
<br>
<label> Name : <?php echo $colD['Doctorname']; ?></label>
<br>
<br>
<label> Address : <?php echo $colD['Address']; ?></label>
<br>
<br>
<label> Contact Number : <?php echo $colD['ContactNumber']; ?></label>
<br>
<br>
<label> Specialized In : <?php echo $colD['categorey']; ?></label>
<br>
<br>
</div
</form>
</body>
</html>
Searchpatient.php
<?php include '../../datalayer/bookserver.php'; ?>
<!DOCTYPE html>
<html>
<head>
<title>Doctor</title>
<link rel="stylesheet" href="style3.css">
<link
href="https://fonts.googleapis.com/css2?family=Alfa+Slab+One&family=Open+Sans:wght@300&display=
swap" rel="stylesheet">
</head>
<header>
<h1>Doctor<span>Patient</span></h1>
<nav>
<ul>
<li><a href="index2.php">My Info</a></li>
<li><a href="doctorapp.php">My Appointments</a></li>
Dept. Of CSE <li><a href=" searchpatient.php">Search Patient</a></li> Page 31
Doctor Appointment System 2020-21

<li><a href="add.php">Add Description</a></li>


<li><a href="../../applicationlayer/Doctorpatient.php">Logout</a></li>
</ul>
</nav>
</header>
<body>
<form method="post" action="searchpatient.php" class="patientsearch">
<?php include ('../../datalayer/errors.php') ;?>
<div class="input-group">
<label style="font-weight: bold; font-size: 30px">Search By:</label>
<label style="font-weight: bold">*Patient ID</label>
<label style="font-weight: bold">*Patient Name</label>
<input type="text" name="PID" >
</div>
<div class="input-group">
<button type="submit" name="SearchP" class="btn">Search</button>
</div>
</form>
</form>
<?php
if (isset($_POST['SearchP'])) {
?><table class="table3" >
<caption style="margin-left: 34px;padding: 10px;font-weight: bold;font-size: 30px;"
class="asd">Patient Information</caption>>
<tr>
<th>PatientID</th>
<th>Name</th>
<th>Address</th>
<th>Contact Number</th>
<th>Email</th>
<th>BloodGroup</th>
</tr> <?php
$PID =$mysqli -> real_escape_string($_POST['PID']);
$sqlP="SELECT * FROM patients WHERE UserID=('$PID') OR Name=('$PID') " ;
$resultP=$mysqli->query($sqlP);
if(mysqli_num_rows($resultP)==1){
while ($rowP=$resultP->fetch_assoc()) {
echo
"<tr><td>".$rowP["UserID"]."</td><td>".$rowP["Name"]."</td><td>".$rowP["Address"]."</td><td>".$ro
wP["ContactNumber"]."</td><td>".$rowP['Email']."</td><td>".$rowP['Bloodtype']."</td></tr>";
}
echo "</table";
}
}?>
</table>
<?php
if (isset($_POST['SearchP'])) {

?><table class="table2">
<caption style="margin-left: 34px;padding: 10px;font-weight: bold;font-size: 30px;"
class="asd">Treatment History</caption>>
<tr>
<th>PatientID</th>
<th>PatientName</th>
Dept. Of CSE <th>Treatment</th> Page 32
Doctor Appointment System 2020-21

<th>Doctor's Note</th>
</tr> <?php
$PID =$mysqli -> real_escape_string($_POST['PID']);
$sqlP2="SELECT * FROM description WHERE descID=('$PID') OR
descName=('$PID') " ;
$resultP2=$mysqli->query($sqlP2);
if(mysqli_num_rows($resultP2)>1){
while ($rowP2=$resultP2->fetch_assoc()) {
echo
"<tr><td>".$rowP2["descID"]."</td><td>".$rowP2["descName"]."</td><td>".$rowP2["treatment"]."</td>
<td>".$rowP2['Note']."</td></tr>";
}
echo "</table";
}
}?>
</table>
</body>
</html>
Style3.css

body,html{
margin: 0;
padding: 0;
}
header{
width: 100%;
height: 70px;
background-color: #282828;
}
h1{
position: absolute;
padding: 3px;
float: left;
margin-left: 2%;
margin-top: 10px;
font-family: 'Alfa Slab One',cursive;
color: #423289;
}
span{
color: #ffffff;
}
ul{
width: auto;
float: right;
margin-top: 8px;
}
li{
display: inline-block;
padding: 15px 15px;
}
a{
text-align: center;
color: #ffffff;
text-decoration: none;
Dept. Of CSE font-family: 'Open Sans',sans-serif; Page 33
Doctor Appointment System 2020-21

font-size: 1.2vw;

}
a:hover{
color: #F0c330;
transition: 0.5s;
}
.Dcontent{
font-weight: 35px;
font-size: 35px;
}
*{
margin: 0px;
padding: 0px;
}
body{
font-size: 120%;
background: #F8F8FF;
}
*{
margin: 0px;
padding: 0px;

}
.Dbody{
font-size: 120%;
background: #423289;

.Dheader{
width: 30%;
margin: 50px auto 0px;
color: white;
background: #423289;
text-align: center;
border: 1px solid #B0C4DE;
border-bottom: none;
border-radius: 10px 10px 0px 0px ;
padding: 20px;
}

.Dform{

width: 30%;
margin:0px auto;
padding: 20px;
border: 1px solid #B0C4DE;
background: white;
border-radius: 0px 0px 10px 10px;
Dept. Of CSE Page 34
Doctor Appointment System 2020-21

.input-groupD{
margin: 10px 0px 10px 0px;
}

.input-groupD label{
display: block;
text-align: left;
margin: 3px;

.input-groupD input{
height: 30px;
width: 93%;
padding: 5px 10px;
font-size: 16px;
border-radius: 5px;
border:1px solid grey;

.btnD{

padding: 10px;
font-size: 15px;
color: white;
background: #423289;
border:none;
border-radius: 5px
}
.error{
width: 92%;
margin: 0px auto;
padding: 10px;
border:1px solid #a94442;
color: #a94442;
background: #f2dede;
border-radius: 5px;
text-align: left;
}
.header{
width:15%;
margin: 50px 0px 0px;
color: white;
background: #423289;
text-align: center;
border: 3px solid #423289;
border-bottom: none;
border-radius: 10px 10px 0px 0px ;
padding: 20px;
}
Dept. Of C.iSnEfo{ Page 35
Doctor Appointment System 2020-21

width: auto;
margin-left: 0px;
padding: 20px;
border: 3px solid #423289;
background: white;
border-radius: 0px 0px 10px 10px;
}
.table2{
border-collapse: collapse;
width: 100%;
color: #282828;
font-family: monospace;
font-size: 20px;
text-align: center;
margin-top: 130px
}
th{
background-color: #423289;
color: white;
width: auto;
}
tr:nth-child(even){
background-color: #f2f2f2;
width: auto;
}
.my1{
color: #423289;
}
.my1{
float: left;
width: 25%;
margin-left: 34%;
background: #282828;
text-align: center;
border: 2px solid #282828;
border-bottom: none;
border-radius: 10px 10px 0px 0px ;
padding: 20px;
margin-top: 30px;
font-family: 'Alfa Slab One',cursive;
color: #423289;
}
.mys{
color: #ffffff;
}
.input-group{
margin: 10px 0px 10px 0px;
}
.input-group label{
display: block;
text-align: left;
margin: 5px;
}
.input-group input{
Dept. Of CSE height: 20px; Page 36
Doctor Appointment System 2020-21

width: 93%;
padding: 5px 10px;
font-size: 16px;
border-radius: 5px;
border:1px solid grey;
}
.patientsearch{
width: 30%;
margin:0px auto;
padding: 20px;
border: 1px solid #423289;
background: white;
border-radius: 0px 0px 10px 10px;
}
.btn{
margin :0 50% 0 40%;
padding: 10px 30px 10px 30px;
font-size: 15px;
color: white;
background: #423289;
border:none;
border-radius: 5px;
}
.add{
width: 30%;
margin:0px auto;
padding: 20px;
border: 1px solid #B0C4DE;
background: white;
border-radius: 0px 0px 10px 10px;
}
.input-group-add input{
height: 55px;
width: 93%;
padding: 5px 10px;
font-size: 16px;
border-radius: 5px;
border:1px solid grey;
}
.input-group-add{
margin: 10px 0px 10px 0px;
}
.input-group-add label{
display: block;
text-align: left;
margin: 5px;
}
.thanks{
color: #423289;
font-size: 40px;
}
.error{
width: 92%;
margin: 0px auto;
Dept. Of CSE padding: 10px; Page 37
Doctor Appointment System 2020-21

border:1px solid #a94442;


color: #a94442;
background: #f2dede;
border-radius: 5px;
text-align: left;
}
.table3{
border-collapse: collapse;
width: 100%;
color: #282828;
font-family: monospace;
font-size: 20px;
text-align: center;
margin-top: 10px;
padding: 0;
}
PATIENT
Book.php
<?php include '../../datalayer/bookserver.php'; ?>
<!DOCTYPE html>
<html>
<head>
<title>Patient</title>
<link rel="stylesheet" href="style2.css">

<link
href="https://fonts.googleapis.com/css2?family=Alfa+Slab+One&family=Open+Sans:wght@300&display=
swap" rel="stylesheet">
</head>

<header>
<h1>Doctor<span>Patient</span></h1>
<nav>
<ul>

<li><a href=" index.php">MyInfo</a></li>


<li><a href=" book.php">Book Appointment</a></li>
<li><a href="view.php">View Appointment</a></li>
<li><a href="cancel.php">Cancel Booking</a></li>
<li><a href="searchdoctor.php ">Search Doctor</a></li>
<li><a href="donate.php">Donate Organ</a></li>
<li><a href="searchdonor.php">Search Donar</a></li>
<li><a href="../../applicationlayer/Doctorpatient.php">Logout</a></li>
</ul>
</nav>
</header>
<body>
<div class="header">
<h2>Book Appointment</h2>
</div>

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

<?php include ('../../datalayer/errors.php');?>


Dept. Of CSE <form action="<?php echo $_SERVER['PHP_SELF'];?>" method="post"> Page 38
Doctor Appointment System 2020-21

<div class="input-group">
<label>Categery</label>
<select name="categorey" class="xd">
<option value="bone" >bone</option>
<option value="heart">heart</option>
<option value="Dentistry">Dentistry</option>
<option value="MentalHealth">Mental Health</option>
<option value="Surgery">Surgery</option>
</select>
</div>
<div class="input-group">
<button type="submit" name="Search" class="btn">Search</button>
</div>
<?php
if (isset($_POST['Search'])) {
$categorey = mysqli_real_escape_string($mysqli,$_POST['categorey']);

$query2="SELECT * FROM doctor WHERE categorey=('$categorey')";


$result2=mysqli_query($mysqli,$query2);
?>
<div class="input-group">
<label>Doctor ID</label>

<select class="input-group2" name="docID">

<?php while ($row2=mysqli_fetch_assoc($result2)) {


?>

<option> <?php echo $row2['DoctorID'] ?> </option


<?php
} ?>
</select>
</div>
<div class="input-group">
<label>Appointment ID</label>
<input type="text" name="AppoID" >
</div>
<div class="input-group">
<label>Date</label>
<input type="Date" name="Date">
</div>

<div class="input-group">
<label>Time</label>
<input type="Time" name="Time">
</div>

<div class="input-group">
<button type="submit" name="Book" class="btn">BOOK</button>
</div>
<?php
}
?>
Dept. Of C<S/fEorm> Page 39
Doctor Appointment System 2020-21

</body>
</html>
cancel.php
<?php include '../../datalayer/bookserver.php'; ?>
<!DOCTYPE html>
<html>
<head>
<title>Patient</title>
<link rel="stylesheet" href="style2.css">

<link
href="https://fonts.googleapis.com/css2?family=Alfa+Slab+One&family=Open+Sans:wght@300&display=
swap" rel="stylesheet">
</head>

<header>
<h1>Doctor<span>Patient</span></h1>
<nav>
<ul>
<li><a href=" index.php">MyInfo</a></li>
<li><a href=" book.php">Book Appointment</a></li>
<li><a href=" view.php">View Appointment</a></li>
<li><a href=" cancel.php">Cancel Booking</a></li>
<li><a href="searchdoctor.php ">Search Doctor</a></li>
<li><a href=" donate.php">Donate Organ</a></li>
<li><a href="searchdonor.php">Search Donar</a></li>
<li><a href="../../applicationlayer/Doctorpatient.php">Logout</a></li>

</ul>
</nav>
</header>
<body>
<form method="post" action="cancel.php">
<?php include ('../../datalayer/errors.php') ;?>
<div class="input-group">
<label>Appointment ID</label>
<input type="text" name="AppoID2" >
</div>
<div class="input-group">
<button type="submit" name="cancel" class="btn">Cancel</button>
</div>
</form>
</form>
</body>
</html>
Donate.php
<?php include '../../datalayer/bookserver.php'; ?>

<!DOCTYPE html>
<html>
<head>
<title>Patient</title>
<link rel="stylesheet" href="style2.css">
Dept. Of CSE Page 40
Doctor Appointment System 2020-21

<link
href="https://fonts.googleapis.com/css2?family=Alfa+Slab+One&family=Open+Sans:wght@300
&display=swap" rel="stylesheet">
</head>

<header>
<h1>Doctor<span>Patient</span></h1>
<nav>
<ul>
<li><a href=" index.php">MyInfo</a></li>
<li><a href=" book.php">Book Appointment</a></li>
<li><a href="view.php">View Appointment</a></li>
<li><a href="cancel.php">Cancel Booking</a></li>
<li><a href="searchdoctor.php ">Search Doctor</a></li>
<li><a href="donate.php">Donate Organ</a></li>
<li><a href="searchdonor.php">Search Donar</a></li>
<li><a href="../../applicationlayer/Doctorpatient.php">Logout</a></li>

</ul>
</nav>
</header>
<body>
<div class="header">
<h2>Donate Organ</h2>
</div>
<form method="post" action="donate.php">
<?php include ('../../datalayer/errors.php'); ?>
<?php
if (isset($_POST['Donate'])) {

$DUserID = $mysqli -> real_escape_string($_POST['DUserID']);


$DUsername = $mysqli -> real_escape_string($_POST['DName']);
$DAddress = $mysqli -> real_escape_string($_POST['DAddress']);
$DContactNumber = $mysqli ->
real_escape_string($_POST['DContactNumber']);
$DEmail = $mysqli -> real_escape_string($_POST['DEmail']);
$Dbloodtype = $mysqli -> real_escape_string($_POST['Dbloodtype']);
$Dorgan = $mysqli -> real_escape_string($_POST['Organ']);
if (empty($DUserID)) {
array_push($errors,"UserID is required");
# code...
}
if (empty($DUsername)) {
array_push($errors,"UserName is required");
# code...

if (empty($DAddress)) {
array_push($errors,"Address is required");
# code...
}
Dept. Of CS E Page 41
i f (empty($DContactNumber)) {
Doctor Appointment System 2020-21

array_push($errors,"Contact Number is required");


# code...
}
if (empty($DEmail)) {
array_push($errors,"Email is required");
# code...
}
if (empty($Dbloodtype)) {
array_push($errors,"Bloodtype is required");
# code...
}
if(count($errors)==0){
$sql7 = "INSERT INTO donor
(donarID,donarname,donaraddress,donarnumber,donaremail,donarblood,organ) VALUES
('$DUserID','$DUsername','$DAddress','$DContactNumber','$DEmail','$Dbloodtype','$Dorgan') ";
if ($mysqli -> query($sql7)) { ?>
<h2 class="thanks"> <?php printf("Thanks For Donation",$mysqli->affected_rows);?></h2
<?php
}
}
?>
<div class="input-group">
<label>User ID</label>
<input type="text" name="DUserID" value=" <?php echo ""
.isset($_SESSION['UserID']);?> " >
</div>
<div class="input-group">
<label>Name</label>
<input type="text" name="DName" value="<?php echo $col['Name']; ?> " >
</div>
<div class="input-group">
<label>Address</label>
<input type="text" name="DAddress" value="<?php echo $col['Address']; ?>">
</div>
<div class="input-group">
<label>Contact Number</label>
<input type="text" name="DContactNumber" value=" <?php echo
$col['ContactNumber']; ?>">
</div>
<div class="input-group">
<label>Email address</label>
<input type="text" name="DEmail" value="<?php echo $col['Email']; ?>">
</div>
<div class="input-group">
<label>Blood type</label>
<input type="text" name="Dbloodtype" value="<?php echo $col['Bloodtype']; ?>">
</div>
<div class="input-group">
<label>Type Of Organ</label>
<select name="Organ" class="xd">
Dept. Of CSE Page 42
<option value="Blood">Blood</option>
Doctor Appointment System 2020-21

<option value="Heart">Heart</option>
<option value="kidney">kidney</option>
<option value="Eye">Eye</option>
</select>
<div class="input-group">
<button type="submit" name="Donate" class="btn">Donate</button>
</div>
</div>
</form>
</body>
</html>
Myinfo.php

<?php include ('../../datalayer/server.php'); ?>


<!DOCTYPE html>
<html>
<head>
<title>Patient</title>
<link rel="stylesheet" href="style2.css">
<link
href="https://fonts.googleapis.com/css2?family=Alfa+Slab+One&family=Open+Sans:wght@300&display=
swap" rel="stylesheet">
</head>

<header>
<h1>Doctor<span>Patient</span></h1>
<nav>
<ul>
<li><a href=" index.php">MyInfo</a></li>
<li><a href=" book.php">Book Appointment</a></li>
<li><a href=" view.php">View Appointment</a></li>
<li><a href="cancel.php">Cancel Booking</a></li>
<li><a href=" searchdoctor.php">Search Doctor</a></li>
<li><a href="donate.php">Donate Organ</a></li>
<li><a href="searchdonor.php">Search Donar</a></li>
<li><a href="../../applicationlayer/Doctorpatient.php">Logout</a></li>
</ul>
</nav>
</header>
<body >
<div class="headerP" style="width: 15%;margin-top: 60px;color: white;background:
#39ca74;text-align: center;border-radius: 10px 10px 5px 5px;border-bottom: none; border :1px solid
#39ca74;padding: 10px;margin-left:-4px ">
<h2>My Information</h2>
</div>
<form method="post" action="myinfo.php" class="infoP" style="margin-left:-1px; margin-top:0px ;width:
40%;padding: 20px;border :3px solid #39ca74 ;background: white; border-radius: 10px 10px 10px 10px;"

<div class="contentP" style="font-weight: bold;"


<label>ID: <?php echo "" .$_SESSION['UserID'];?></label>

<br>
<br>
Dept. Of CSE <label> Email : <?php echo $col['Email']; ?></label> Page 43
Doctor Appointment System 2020-21

<br>
<br>
<label> Name : <?php echo $col['Name']; ?></label>
<br>
<br>
<label> Address : <?php echo $col['Address']; ?></label>
<br>
<br>
<label> Contact Number : <?php echo $col['ContactNumber']; ?></label>
<br>
<br>
<label> Blood Type : <?php echo $col['Bloodtype']; ?></label>
<br>
<br>

<div class="input-group">
<button type="submit" name="treatmentHistory" class="btn">My-Treatment-
History</button>
</div>

</div>
</form
<?php if (isset($_POST['treatmentHistory'])) {
?>
<table class="table2">
<caption style="margin-left: 34px;padding: 10px;font-weight: bold;font-size: 30px;"
class="asd">Treatment History</caption>
<tr>
<th>DoctorID</th> ?>
<th>DoctorName</th>
<th>Treatment</th>
<th>Doctor's Note</th>
</tr>
<?php
$PID =$mysqli -> real_escape_string($_POST['UserID']);
$sqlP2="SELECT * FROM description WHERE descID=('$PID') OR
descName=('$PID') " ;
$resultP2=$mysqli->query($sqlP2);
if(mysqli_num_rows($resultP2)>1){
while ($rowP2=$resultP2->fetch_assoc()) {

echo
"<tr><td>".$rowP2["descID"]."</td><td>".$rowP2["descName"]."</td><td>".$rowP2["treatment"]."</td>
<td>".$rowP2['Note']."</td></tr>";
}
echo "</table";
}
}?>
</table>
</body>
</html>

<!--<?php if (isset($_SESSION['success'])) : ?>


<div class="error success" >
Dept. Of CSE <h3> Page 44
Doctor Appointment System 2020-21

<?php

unset($_SESSION['success']);
?>
</h3>
</div>
<?php endif ?>
Style.css
*{
margin: 0px;
padding: 0px;

}
body{
font-size: 120%;
background: #39ca74;

}
.header{
width: 30%;
margin: 50px auto 0px;
color: white;
background: #39ca74;
text-align: center;
border: 1px solid #B0C4DE;
border-bottom: none;
border-radius: 10px 10px 0px 0px ;
padding: 20px;
}
form{

width: 30%;
margin:0px auto;
padding: 20px;
border: 1px solid #B0C4DE;
background: white;
border-radius: 0px 0px 10px 10px;

}
.input-group{
margin: 10px 0px 10px 0px;
}

.input-group label{
display: block;
text-align: left;
margin: 3px;

.input-group input{
height: 30px;
width: 93%;
Dept. Of CSE padding: 5px 10px; Page 45
Doctor Appointment System 2020-21

font-size: 16px;
border-radius: 5px;
border:1px solid grey;

}
.btn{
padding: 10px;
font-size: 15px;
color: white;
background: #39ca74;
border:none;
border-radius: 5px;

.error{

width: 92%;
margin: 0px auto;
padding: 10px;
border:1px solid #a94442;
color: #a94442;
background: #f2dede;
border-radius: 5px;
text-align: left;

}
Technologies Used for Development of Project
• Front-End :- HTML, CSS, JAVASCRIPT, Bootstrap Library
• Back-End :- PHP, MySQL Database
• Database Connectivity :- XAMMP Sever and phpMyAdmin
Hardware Requirements
• Processor :- Pentium 4 @ 3.0 GHz or equivalent less may not work and
not recommended

• Memory :- 128 MB (256 MB or more recommended)

• Hard Disk Drive Space :- Min 500 MB to 1GB

• RAM :- 250 MB or Higher

• Monitor :- Standard VGA Monitor


Dept. Of CSE • Keyboard :- Required, Standard 101 Keyboard Page 46
Doctor Appointment System 2020-21

• Mouse :- Required

Application

 To Keep track of Patients History


 To Keep track of Doctor’s History and Medical Treatments.
 To generate Bills and provide online billing system

Conclusion

This web application can be used over every medical domain, for example
Medical Shops, Private and Public Clinics and Health Care Centre’s, Pharmacies to
keep the track of Patients and Doctors with well-maintained Database System.
Doctor Appointment System 2020-21

Biblography

Textbooks Referred

1.Database System Models, Languages , Design and Application Programming, Ramez Elsamri
and Shamkant B Navathe, 7th Edition,

2.Database Management Systems, Ramakrishnan and Geheke, 3rd Editon, 2014, MCGrawHill

3.Silberschatz Korth and Sudharshan, Database System Concepts 6th edition McGraw Hill 2013.

4.Cornell, Morris and Rob, Databse Principles Fundamentals of Design, Implementation

Websites Referred

www.w3schools.com/html
www.apache.org
in.php.net
www.google.com
localhost/phpmyadmin
www.mysql.com
Doctor Appointment System 2020-21

Dept. Of CSE Page 47

You might also like