0% found this document useful (0 votes)
32 views124 pages

Docter Appointment Booking System

docter appointment system in project of php,mysql with full source code
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views124 pages

Docter Appointment Booking System

docter appointment system in project of php,mysql with full source code
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 124

A

Project Report on
Doctor Appointment Booking System

Submitted in the Partial fulfillment of the requirement for awarding the degree of

Bachelor of Computer Application (BCA)


SEM VI, Year 2016-17

By
Devanshi Ranpariya
Foram Savaliya

Under the Guidance of


Mrs.Daya Usdad

DEPARTMENT OF COMPUTER SCIENCE


LATE P.S. HIRAPARA MAHILA BCA COLLEGE JETPUR

Affiliated to

SAURAHTRA UNIVERSITY - RAJKOT


Preface

This report contains all the outputs of a project undertaken to develop a working model of Doctor
Appointment Booking Systemand to study the existing working system. As part of this study, we analyzed
the requirements of the working model and tried to improve it using the technological functionality that the
current computer science provides.
This volume contains the documentation summary of the working system, the background study and
analysis, the technical requirements and the working specification of the developed system.
We recommend the user to take the advantage of the study presented here and implement the system
with their required improvisation. We hope this study will reduce the burden of the reanalysis of the
development phase.

BCA Dept., SPKM-Jetpur | I A Project on: Docter Appointment


Booking System
Acknowledgment
“It is not possible to prepare a project report without the assistance & encouragement of other
people. This one is certainly no exception.”

On the very outset of this report, I would like to extend my sincere & heartfelt obligation towards all
the personages who have helped me in this endeavor. Without their active guidance, help, cooperation &
encouragement, I would not have made headway in the project. I am ineffably indebted to our HOD /
Prof.Jaydeep Ramani for conscientious guidance and encouragement to accomplish this assignment.

I am extremely thankful and pay my gratitude to my project guide Daya Usdad his valuable
guidance and support on completion of this project in its presently.

I extend my gratitude to Department Of Computer Science, Late P.S. Hirapara Mahila BCA College
-Jetpur for giving me this opportunity.

Thanking You,
Devanshi Ranapriya (003003142347)
Foram Savaliya (003003142360)

BCA Dept., SPKM-Jetpur | II A Project on: Docter Appointment


Booking System
INDEX
SR No Title Page No
1 Project Profile 4
1.1 Definition 4
1.2 Scope 4
1.3 Objective 4
2 System Analysis and Specification 5
2.1 Introduction 5
2.2 Feasibility Study 5
2.3 Problem Analysis 8
2.4 Need of New System 8
3 System Requirement Specification 9
3.1 Proposed System and 9
Advantages
4 System Design 11
4.1 Data Flow Diagram 11
4.2 E-R Diagram 14
4.3 Data Dictionary 15
5 Screen Shots 18
6 Coding 45
7 Testing (Manual and Test Cases ) 101
7.1 Manual Testing 101
7.2 Test Cases 103
8 Enhancements 106
8.1 Advantages 106
8.2 Limitation 106
8.3 Future Scope 106
9 References 107

BCA Dept., SPKM-Jetpur | III A Project on: Docter Appointment


Booking System
Chapter-1:- Project Profile

(1.1) Definition:-

The Project Doctor Appointment Booking System (DABS)

(1.2) Scope:-

 The Scope of this System is limited to Answering to simple


Queries and consulating the Docter on=line it is not meantfor serious problems
And fixing of personal Appoinment with the docter.

(1.3) Objective:-

 Docter on-line.com is purely a web site and lot of effort is put to make it as user friendly.

 Vast information is maintained in this site so as to develop good awarness in public regarding health.

 Reduce the wastage of time of the client or user.

 The system just acts like a docter asking simple queries andreplying the queries,ehich is very user
friendly.

 It is also useful for Students of medical sciences.

BCA Dept., SPKM-Jetpur | 1 A Project on: Docter Appointment


Booking System
Chapter-2:- Project Profile

(2.1)Introduction:-

Our definition is Doctor Appointment Booking System.

This site is useful for people who face the problem personally, and is also helpful in
knowing information about medical sciences.

The doctor on-line it is not meant for serious problems and fixing of personnel
appointment with the doctor.

Provide a website where a client directly goes for online consulting a doctoring case
of urgency.

Reduce the wastage of time of the client or user.

(2.2)Feasibility Study:-

Feasibility study gives the idea about our software that it is feasible to develop
project within such type of tools.it gives ratio to our project, how much area we can
consuct.it is one type of measurable for measured our project.

This is second stage after Preliminary Investigation,


Feasibility Study divided in three types.

1. Technical Feasibility
2. Economical Feasibility
3. Operational Feasibility

1. Technical Feasibility:-

Our web site is developed with the help of current equipment and existing
Software & hardware technology.

BCA Dept., SPKM-Jetpur | 2 A Project on: Docter Appointment


Booking System
Software Technology:-

Category Sub-Category Version

Font End Notepad++ -

Browser MozilaFirefox -

Backend MySQL 2012

Operating System Microsoft Windows8


Windows

Hardware Technology:-

Category Sub-category

Processor Core 2 Due

Mother Board G 31
RAM DDR2(2GB)

Hard Disk Sea gate 250

SNPS Power 450 Voit’intex

Monitor LG 17` CRT

Key board Logitech

Mouse Logitech

2. Economical Feasibility:-

We can get benefit on the basic of developing this website to make cost of any
software and hardware is acceptable.

BCA Dept., SPKM-Jetpur | 3 A Project on: Docter Appointment


Booking System
Software :-

Category Version Price

Notepad++(php) - Opensource

Wamp Server - Opensource

Sql-Server 2012 Opensource

Cost of hardware use to develop this system :-

Category Sub-Category Price

Processor Core 2 Due 5400

Mother Board G 31 2400

RAM DDR2(2GB) 1400

HardDidk Sea gate 250 3200

Keyboard Logitech 500

Mouse Logitech 400

Monitor LG17’CRT 5200

SNPSPower 450 Voit’intex 500

3. Operation Feasibility:-

- Our web site provide many operations which is use for


Further development and implementation as a new.
- User can use this application in any browser.
- We provide facility for many operations.
- So, our system is operational feasible also.

BCA Dept., SPKM-Jetpur | 4 A Project on: Docter Appointment


Booking System
(2.3) Problem Analysis:-

Problem:-use the time function when time is not


Refresh.

Soluation:-time is not refreshing when create a timestamp of the data & time.

Problem: - user is not getting the same time appointment in another user.

Soluation:-when the fetch row of the user appointment and condition is check the this time
appointment is avaliable or not when the time is not available user is get the appointment or time is
available when user is get the message time is already booking.

(2.4)Need of new system:-

Our website provide a where a client directly goes for online consulting a doctoring case of urgency.
This site is useful for people who face the problem personally.
Is also helpful in knowing information about medical sciences.

BCA Dept., SPKM-Jetpur | 5 A Project on: Docter Appointment


Booking System
Chapter-3:- System Requirement Specification

(3.1) Proposed System and Advantages:-

User:
Login
Registration
Feedback
Forget password
About us
Contact us
Doctor Detail

 Login:
o User can login.

 Registration:
o User can registration.

 Feedback:
o User can give the feedback.

 Forget password:
o User can forget password in our site.

 About us:
o User can show the about in our site.

 Contact us:
o User can contact for the Developers.

 Doctor Detail :
o User can show Doctor information and take appointment.

BCA Dept., SPKM-Jetpur | 6 A Project on: Docter Appointment


Booking System
Admin:

Login
Manage Registration
Manage Feedback
Manage Patient
Add Doctor
Manage Admin

 Login:
o Admin can login.

 Manage Registration:
o Admin can view registration user & delete.

 Manage Feedback:
o Admin can view feedback user & delete.

 Manage Patient:
o Admin can view patient & delete.

 Add Doctor:
o Admin can view Doctor &insert, update & delete.

 Manage Admin:
o Show the how many admin in our site.

Docter:

Login
Appointment

 Login:
o Docter can login.

 Appointment:
o Docter can show the all appointment.

BCA Dept., SPKM-Jetpur | 7 A Project on: Docter Appointment


Booking System
Chapter-4:- System Design

(4.1) Data Flow Diagram:-

The symbols that are used the data flow diagram carry following meaning.

Symbol Name Use

It symbolizes
Rectangle The sources
It
Circle Symbolizes
The use data process
Unmarked It symbolizes
line Connectivity
Without a
It symbolized
Marked Connectivity
Line Without a
Round It symbolized
Rectangle Connectivity
Without a
Start/End

BCA Dept., SPKM-Jetpur | 8 A Project on: Docter Appointment


Booking System
(4.1) 0-level

User Admin Docter

Logout Login

Login Docter Login


Appoinment
Logout System Logout

BCA Dept., SPKM-Jetpur | 9 A Project on: Docter Appointment


Booking System
(4.1)1-level

User Docter Admin

Login

Login Register Login

Add View
User User

Add View
FeedBack
Feedback Feedback

Add View
Appoinm AdmitPatient Appoinm
ent ent

View Add
Docter
Docter Docter

View Add
ContactUs
Admin Admin

BCA Dept., SPKM-Jetpur | 10 A Project on: Docter Appointment


Booking System
(4.2) E-R Diagram:-
Username Password Addressd

Email City

Lastnmae Gender

Firstname Contact

U_type Securituque.
Registeration
U_id Answer

A_id has U_id Name City

Age
has
Gender

Contact
Appoinment
Disease

Date
Status1 Status Date_Time D_id Time

f_id u_id

Name FeedBack

D_id has Name Age


Gender
Type
Feedback
Contact

Qulification
has Docter
Email

Address
charge Information File Type

BCA Dept., SPKM-Jetpur | 11 A Project on: Docter Appointment


Booking System
(4.2) Data Dictionary:-

Registration:-

No Fieldname Data Type Size Remarks


1 u_Id numeric (18,0) primaryKey
2 u_type numeric (50)
3 firstnm varchar (50)
4 lastnm varchar (50)
5 emailid varchar (18,0)
6 username varchar (50)

7 password varchar (50)


8 address varchar (50)
9 city varchar (50)
10 gender varchar (50)
11 contact numeric (18,0)
12 sequrity_question Text (50)
13 Seq_ans Text (50)

Feedback:-

No fieldname Data Type Size Remarks


1 f_id numeric (18,0) primaryKey
2 f_name varchar (50)
3 f_type varchar (50)
4 f_feedback varchar (50)

BCA Dept., SPKM-Jetpur | 12 A Project on: Docter Appointment


Booking System
Admit Patient:-

No fieldname Data Type Size Remarks


1 a_Id numeric (18,0) primaryKey
2 d_id numeric (50) ForeignKey
3 name varchar (50)

4 city varchar (50)

5 age numeric (18,0)

6 gender varchar (50)

7 contact numeric (50)

8 disease varchar (50)

9 time time (50)


10 date date (50)
11 Date_time varchar (18,0)
12 status varchar (50)
13 Status1 varchar (50)
14 charge numeric (50)

BCA Dept., SPKM-Jetpur | 13 A Project on: Docter Appointment


Booking System
AddDocter:-

No fieldname Data Type Size Remarks


1 d_id numeric (18,0) primaryKey
2 name numeric (50) ForeignKey
3 age varchar (50)

4 gender varchar (50)

5 contact numeric (18,0)

6 qualification varchar (50)

7 emailid numeric (50)

8 address varchar (50)

9 type time (50)


10 file date (50)
11 information varchar (18,0)
12 charge varchar (50)
13 Status1 varchar (50)
14 charge numeric (50)

Admin:-
No fieldname Data Type Size Remarks
1 id numeric (18,0) primaryKey
2 name numeric (50)
3 email_id varchar (50)
4 contact numeric (50)

BCA Dept., SPKM-Jetpur | 14 A Project on: Docter Appointment


Booking System
Chapter-5:- Screen Shots

 Home

––

 This page shows the overview of our site

BCA Dept., SPKM-Jetpur | 15 A Project on: Docter Appointment


Booking System
 Registration

 New user can register from this page

BCA Dept., SPKM-Jetpur | 16 A Project on: Docter Appointment


Booking System
 Login

 User can login from this page

BCA Dept., SPKM-Jetpur | 17 A Project on: Docter Appointment


Booking System
 Aboutus

 This page shows the hospital facility

BCA Dept., SPKM-Jetpur | 18 A Project on: Docter Appointment


Booking System
 Contactus

 This page shows the contactus from the admin

BCA Dept., SPKM-Jetpur | 19 A Project on: Docter Appointment


Booking System
 Givefeedback

 This page shows the user can give the feedback

BCA Dept., SPKM-Jetpur | 20 A Project on: Docter Appointment


Booking System
 Viewdocter

 This page show the docter

 Docterdetail
BCA Dept., SPKM-Jetpur | 21 A Project on: Docter Appointment
Booking System
BCA Dept., SPKM-Jetpur | 22 A Project on: Docter Appointment
Booking System
 This page show the docter information

 Giveappointment

 This page show the user can give the appointment

BCA Dept., SPKM-Jetpur | 23 A Project on: Docter Appointment


Booking System
 Thankyou

 This page show the user can give the succesfullly appointment

BCA Dept., SPKM-Jetpur | 24 A Project on: Docter Appointment


Booking System
 Admin/home

 This page show the admin home page

BCA Dept., SPKM-Jetpur | 25 A Project on: Docter Appointment


Booking System
 Viewregistration

 Admin can view the user detail and delete

BCA Dept., SPKM-Jetpur | 26 A Project on: Docter Appointment


Booking System
 Viewfeedback

 Admin can view the user feedback and delete

BCA Dept., SPKM-Jetpur | 27 A Project on: Docter Appointment


Booking System
 Viewpatient

 Admin can view the patient detail & delete & send the docter

BCA Dept., SPKM-Jetpur | 28 A Project on: Docter Appointment


Booking System
 Sendpatient

 Admin can send the docter

BCA Dept., SPKM-Jetpur | 29 A Project on: Docter Appointment


Booking System
 Viewdocter

 Admin can view the docter and insert,edit & delete

BCA Dept., SPKM-Jetpur | 30 A Project on: Docter Appointment


Booking System
 Adddocter

 Admin can add the docter

BCA Dept., SPKM-Jetpur | 31 A Project on: Docter Appointment


Booking System
 Updatedocter

 Admin can edit the docter

BCA Dept., SPKM-Jetpur | 32 A Project on: Docter Appointment


Booking System
 Viewallpatient

 Admin can shows the all appointmen

BCA Dept., SPKM-Jetpur | 33 A Project on: Docter Appointment


Booking System
 Viewadmin

 Show the new admin can insert,edit & delete

s
BCA Dept., SPKM-Jetpur | 34 A Project on: Docter Appointment
Booking System
 Viewloginuser

 Admin can view the login user

BCA Dept., SPKM-Jetpur | 35 A Project on: Docter Appointment


Booking System
 Docter/Home

 This page can show the docter home page

BCA Dept., SPKM-Jetpur | 36 A Project on: Docter Appointment


Booking System
 Appointment

 Docter can show the for each appointment

BCA Dept., SPKM-Jetpur | 37 A Project on: Docter Appointment


Booking System
 Changepassword

 This page show the user can change the password

BCA Dept., SPKM-Jetpur | 38 A Project on: Docter Appointment


Booking System
 Forgetpassword1

 This page show the user can forget your passwordwhen give the username

BCA Dept., SPKM-Jetpur | 39 A Project on: Docter Appointment


Booking System
 Forgetpassword2

 This page show the user can give answer for the question

BCA Dept., SPKM-Jetpur | 40 A Project on: Docter Appointment


Booking System
 Forgetpassword3

 This page show the user can give the newpassword & confirmpassword

BCA Dept., SPKM-Jetpur | 41 A Project on: Docter Appointment


Booking System
Chapter-6:- Coding

Style.css

*
{
margin:0px;
padding:10px;
}
#wrapper
{
margin:0 auto;
width:3300px;
}
#heading
{
background:#4286AD;
padding:20px 20px 130px 10px;
font-size:150px;
color:white;
text-shadow:10px 10px 10px white;
font-family:monotype corsiva;
}
#content
{
padding:0px 0px 10px 10px;
//background:#D4E6E6;
font-size:40px;
border-top:2px dashed black;
border-bottom:2px dashed black;
background-image:url('../image/bg44.jpg');

.font
{
font-size:90px;
}
.red
{
color:red;
font-size:100px;
}

BCA Dept., SPKM-Jetpur | 42 A Project on: Docter Appointment


Booking System
.content_m1
{
font-size:50px;
font-style:italic;

}
.menu
{

//padding:20px 20px 60px 10px;

}
.menu1
{

border-color:#E21B1B;
text-shadow:10px 10px 10px #188DF9;
border-radius:50px;
background:#31698C;
border:2px solid black;
border-color:black;
padding:0px 0px 10px 10px;
font-family:monotype corsiva;
}
.a
{
color:white;
font-size:70px;
font-family:monotype corsiva;
}
.font2
{
font-size:80px;
}
.font1
{
font-size:60px;
}
.staff
{
background:#31698C;
border:2px solid black;
color:white;
border-color:black;
}
.contactus
{
border-radius:50px;

BCA Dept., SPKM-Jetpur | 43 A Project on: Docter Appointment


Booking System
background:#31698C;
border:2px solid black;
color:white;
border-color:black;
}
.feedback
{
border-radius:50px;
background:#31698C;
border:2px solid black;
color:white;
border-color:black;
}
.forpass
{
background:#31698C;
}
.tr
{
font-size:50px;
border-radius:30px;

}
.tr1
{
color:white;
}
.staff1
{
background:#31698C;
color:white;
}
.button
{
font-size:50px;
border-radius:30px;

.td
{
font-size:60px;
border-radius:30px;
}
.login
{
border-radius:30px;

BCA Dept., SPKM-Jetpur | 44 A Project on: Docter Appointment


Booking System
background:#31698C;
border:2px solid black;
color:white;
border-color:black;
}
.register
{
border-radius:30px;
background:#31698C;
height:100px;
border:15px solid white;
border-color:gray;
color:white;
font-size:70px;
}
.tr2
{
border-radius:30px;
background:#4286AD;
height:100px;
color:white;
border-color:gray;
font-size:50px;
}
a:hover
{
text-decoration:underline;
color:red;
}
.float-left
{
float:left;
}
.float-right
{
float:right;
font-size:80px;
color:white;
}
#footer
{
background:#4286AD;
padding:0px 0px 50px 20px;
font-size:70px;
text-shadow:5px 5px 5px white;
font-family:monotype corsiva;
color:white;

BCA Dept., SPKM-Jetpur | 45 A Project on: Docter Appointment


Booking System
Index.php

<script language="javascript">
function f1()
{
return confirm("are you sure you want to delete...");
}
function f2()
{
return confirm("are you sure you want to edit...");
}
</script>
<?php
session_start();
?>
<html>
<head><link href="style/style.css" rel="stylesheet" style="text/css"></link>
<title>My Site</title>
</head>
<body>
<div id="wrapper">
<div id="heading" align="center"><h3><big>D</big>octer <big>A</big>ppoinment <big>S</big>ystem
<img src="image/images_348.jpg" class="float-left" height="400" width="350"></img>
<?php
if(isset($_SESSION['u_id']))
{
echo"<a href=index.php?page=logout class=float-right>
<img src='image/unlock.png' height='200' width='200'></a>";

echo"<h3><a href=index.php?page=changepassword class=float-right><h5>


changepassword</h6></a></h1> ";
echo"<h1 class=float-right>welcome....".$_SESSION['username']." </h1>";

}
else
{
echo"<a href=index.php?page=login class=float-right>
<img src='image/users.png' height='200' width='200'></a>";
}
?>

</div>

BCA Dept., SPKM-Jetpur | 46 A Project on: Docter Appointment


Booking System
<div id="content" align="center">
<form>
<table align="center" border="1" class="float-left">
<tr>
<td class="menu1">
<a href='index.php?page=home1' class='a'><h1>Home</a><br><br>
<?php

if(isset($_SESSION['u_type']))
{

if($_SESSION['u_type']==0)
{
echo"<a href='index.php?page=aboutus' class='a'>About Us</a><br><br>";
echo"<a href='index.php?page=contactus' class='a'>Contact Us</a><br><br> ";
echo"<a href='index.php?page=feedback' class='a'>Feedback</a><br><br>";
echo"<a href='index.php?page=docter' class='a'>Doctor Detail</a><br><br>";
echo"<a href='index.php?page=viewuser' class='a'>viewuser</a><br><br>";

}
else if($_SESSION['u_type']==1)
{

echo"<a href='index.php?page=viewregister' class='a'>viewregister</a><br><br>";


echo"<a href='index.php?page=viewfeedback' class='a'>viewfeedback </a><br><br>";
echo"<a href='index.php?page=viewpatient' class='a'>viewpatient</a><br><br> ";
echo"<a href='index.php?page=viewdocter' class='a'>Add_docter</a><br><br>";
echo"<a href='index.php?page=admit2' class='a'>All Appoinment</a><br><br> ";
echo"<a href='index.php?page=viewuser' class='a'>viewuser</a><br><br>";
}

else
{
echo"<a href='index.php?page=appoinment' class='a'>Appoinment</a><br><br> ";

}
else
{

echo"<a href='index.php?page=aboutus' class='a'>About Us</a><br><br>";


echo"<a href='index.php?page=contactus' class='a'>Contact Us</a><br><br> ";

?>

BCA Dept., SPKM-Jetpur | 47 A Project on: Docter Appointment


Booking System
</td>
</tr>
</table>
</form>
<?php
if(isset($_REQUEST['page']))
{
include("include/".$_REQUEST['page'].".php");
}
else
{
include("include/home1.php");
}
?>

</div>
<div id="footer" align="center">prepared by:Devanshi Ranpariya & Foram Savaliya </div>
</div>
</body>
</html>

Home1.php

<html>
<head>
<title>Demo 5 - Semi-transparent Thumbnails</title>
<link href="style/js-image-slider.css" rel="stylesheet" type="text/css" />
<script src="style/js-image-slider.js" type="text/javascript"></script>
<link href="generic.css" rel="stylesheet" type="text/css" />
</head>
<body>

<div id="sliderFrame">
<div id="slider">

<a class="lazyImage" href="image/img1.jpg" ></a>


<a class="lazyImage" href="image/img2.jpg"></a>
<a class="lazyImage" href="image/img4.jpg" ></a>
<a class="lazyImage" href="image/img5.jpg"></a>
<a class="lazyImage" href="image/img6.jpg"></a>
BCA Dept., SPKM-Jetpur | 48 A Project on: Docter Appointment
Booking System
<a class="lazyImage" href="image/img7.jpg" ></a>
<a class="lazyImage" href="image/img8.jpg"></a>
<a class="lazyImage" href="image/img9.jpg"></a>
<a class="lazyImage" href="image/img10.jpg" ></a>
<a class="lazyImage" href="image/img11.jpg"></a>
<a class="lazyImage" href="image/img12.jpg"></a>
<a class="lazyImage" href="image/img13.jpg" ></a>
<a class="lazyImage" href="image/img14.jpg"></a>
<a class="lazyImage" href="image/img15.jpg"></a>
</div>

<!--thumbnails-->
<div id="thumbs">
<a class="lazyImage" href="image/img1.jpg" ></a>
<a class="lazyImage" href="image/img2.jpg"></a>
<a class="lazyImage" href="image/img4.jpg" ></a>
<a class="lazyImage" href="image/img5.jpg"></a>
<a class="lazyImage" href="image/img6.jpg"></a>
<a class="lazyImage" href="image/img7.jpg" ></a>
<a class="lazyImage" href="image/img8.jpg"></a>
<a class="lazyImage" href="image/img9.jpg"></a>
<a class="lazyImage" href="image/img10.jpg" ></a>
<a class="lazyImage" href="image/img11.jpg"></a>
<a class="lazyImage" href="image/img12.jpg"></a>
<a class="lazyImage" href="image/img13.jpg" ></a>
<a class="lazyImage" href="image/img14.jpg"></a>
<a class="lazyImage" href="image/img15.jpg"></a>
</div>
</div>
<table align="center" class="font">

<tr>
<td class="font">
<h3>This site is useful foe people who face the problem personally <br>
and is also helpful in knowing information about <br>medical science</h3>
<br>
<br>
<h3>The docter on-line it is not meant for serious problem and<br>
fixing of personnel Appinment with the docter.</h3>
</td>
</tr>
</table>
</body>
</table>

BCA Dept., SPKM-Jetpur | 49 A Project on: Docter Appointment


Booking System
Aboutus.php

<html>
<head>
</head>
<body>

<div id="content_menu" align="center"><form>


<h1>Facility</h1>
<image src="image/img17.jpg" height="500" width="500">
<image src="image/img1.jpg" height="500" width="500">
<image src="image/img20.jpg" height="500" width="500">
<image src="image/img21.jpg" height="500" width="500">
<image src="image/img22.jpg" height="500" width="500">
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
<h2>This site is useful fore people who face the problem personally <br>
and is also helpful in knowing information about <br>medical science
<br>
<br>
The docter on-line it is not meant for serious problem and<br>
fixing of personnel Appinment with the docter.

</form>
</div>
</body>
</html>

Contactus.php

<?php
include("connection.php");
$query="select * from admin";
$result=mysql_query($query);
if($result)
{
echo"<table border=1 align=center class='register'>";
echo"<tr><th colspan=5 class=tr><h1>Contact us</h1></th></tr>";
echo"<tr>";
while($row=mysql_fetch_array($result))
{

echo"<tr><td class=tr ><h2>name</h2></td>";

BCA Dept., SPKM-Jetpur | 50 A Project on: Docter Appointment


Booking System
echo"<td class=tr>".$row['name']."</td></tr>";
echo"<tr><td class=tr><h2>email_id</h2></td>";
echo"<td class=tr>".$row['email_id']."</td></tr>";
echo"<tr><td class=tr><h2>contact</h2></td>";
echo"<td class=tr>".$row['contact']."</td></tr>";
echo"</tr>";
}
echo"</table>";
}
else
{
echo mysql_error();
}
?>

Include/Admin.php
<?php
include("connection.php");
$editmode=false;
if(isset($_REQUEST['id']))
{
$editmode=true;
$query="select * from admin where id=$_REQUEST[id]";
$result=mysql_query($query);
if($result)
{
$row=mysql_fetch_array($result);
}
else
{
echo mysql_error();
}
}

?>
<html>
<script type="text/javascript" language="javascript">
function check_valid()
{
var NameRegex=/^[A-Za-z]{1,15}$/;
var EmailRegex=/^[A-Za-z0-9._]*\@[A-Za-z]*\.[A-Za-z]{2,5}$/;
var NoRegex=/^\d{10}$/;
var name=document.frmlogin.name.value;
var email_id=document.frmlogin.email_id.value;

BCA Dept., SPKM-Jetpur | 51 A Project on: Docter Appointment


Booking System
var contact=document.frmlogin.contact.value;
if(name=="")
{
alert("enter name");
document.frmlogin.name.focus();
//document.getElementByID("errun").innerHTML="enter your name";
return false;
}
else if(!NameRegex.test(name))
{
alert("enter only chracter in name");
document.frmlogin.name.focus();
//document.getElementByID("errun").innerHTML="enter the valid name";
return false;
}
if(email_id=="")
{
alert("enter Email");
document.frmlogin.email_id.focus();
//document.getElementByID("errun").innerHTML="enter your Email";
return false;
}
else if(!EmailRegex.test(email_id))
{
alert("enter Proper Email Address");
document.frmlogin.email_id.focus();
//document.getElementByID("errun").innerHTML="enter the valid Email";
return false;
}
if(contact=="")
{
alert("enter contact");
document.frmlogin.contact.focus();
//document.getElementByID("errun").innerHTML="enter your contact";
return false;
}
else if(!NoRegex.test(contact))
{
alert("enter only 10 digit in contact");
document.frmlogin.contact.focus();
//document.getElementByID("errun").innerHTML="enter the valid contact";
return false;
}
return true;
}
</script>
<head></head>
<body>

BCA Dept., SPKM-Jetpur | 52 A Project on: Docter Appointment


Booking System
<form name="frmlogin" action="action/add_admin.php" method="post" onsubmit="return
check_valid();">
<?php
if(isset($_REQUEST['id']))
{
echo"<input type='hidden' name='id' value=$_REQUEST[id]>";
}
?>
<table align="center" border="12" class="register">
<tr>
<th colspan=3 >
<h1>Add Admin</h1>
</th>
</tr>
<tr>
<td class="tr">
<h2>Name</h2>
</td>
<td class="tr">
<input type="text" name="name" class="tr"value='<?php if($editmode==true){echo
$row['name'];}?>' placeholder="enter admin name"></td>
</tr>
<tr>
<td class="tr">
<h2>Email_id
</h2>
</td>
<td class="tr">
<input type="text" name="email_id" class="tr"value='<?php if($editmode==true){echo
$row['email_id'];}?>' placeholder="enter Email_id">
</td>
</tr>
<tr>
<td class="tr">
<h2>Contact</h2>
</td>
<td class="tr">
<input type="text" name="contact" class="tr"value='<?php if($editmode==true){echo
$row['contact'];}?>' placeholder="enter contact">
</td>
</tr>
<tr class="tr">
<td colspan=3 align="center" class="tr">
<input type="submit" name="submit" value="submit" class="tr" >
<input type="reset" name="Clear" value="cancle" class="tr"></td>
</tr>
</table>
</form>

BCA Dept., SPKM-Jetpur | 53 A Project on: Docter Appointment


Booking System
</body>
</html>

Action/Add_admin.php

<?php
include("connection.php");
if(isset($_REQUEST['id']))
{
if(isset($_REQUEST['id']))
{
$query="update admin set name='$_REQUEST[name]',
email_id='$_REQUEST[email_id]',contact='$_REQUEST[contact]' where
id='$_REQUEST[id]'";
$result=mysql_query($query);
if($result)
{
header("location:../index.php?page=manageadmin");
}
else
{
echo mysql_error();
}
}
else
{
echo mysql_error();
}

}
else
{
if(isset($_REQUEST['name'])&&isset($_REQUEST['email_id'])&&isset($_REQUEST
['contact']))
{
$name=$_REQUEST['name'];
$email_id=$_REQUEST['email_id'];
$contact=$_POST['contact'];
$query="insert into admin(name,email_id,contact)values
('$name','$email_id','$contact')";
$result=mysql_query($query);
if($result)
{
header("location:../index.php?page=manageadmin");

}
BCA Dept., SPKM-Jetpur | 54 A Project on: Docter Appointment
Booking System
else
{
echo mysql_error();
}
}
}
?>

Action/deleteadmin.php

<?php
include("connection.php");
echo $query="delete from admin where id=".$_REQUEST[id];
if(mysql_query($query,$con))
{
header("location:../index.php?page=manageadmin");
}
else
{
echo mysql_error();
}
mysql_close();

?>

Include/Login.php

<script type="text/javascript" language="javascript">


function check_valid()
{
var NameRegex=/^[A-Za-z]{1,15}$/;
var username=document.frmregistration.username.value;
var password=document.frmregistration.password.value;

if(username=="")
{
alert("Enter Your UserName");
document.frmregistration.username.focus();
return false;
}
else if(!NameRegex.test(username))
{
alert("Enter Only Character In UserName");

BCA Dept., SPKM-Jetpur | 55 A Project on: Docter Appointment


Booking System
document.frmregistration.username.focus();
return false;
}
if(password=="")
{
alert("Enter Your Password");
document.frmregistration.password.focus();
return false;
}
}
</script>
<html>
<head></head>
<body>
<form name="frmregistration" action="action/checklogin.php" method="post" onsubmit="return
check_valid();" >
<?php
if(isset($_REQUEST['msg']))
{
if($_REQUEST['msg']==1)
{
echo"<h2 class='red'>login Successfully</h2>";
}
if($_REQUEST['msg']==2)
{
echo"<h2 class='red'>incorrect UserName Password</h2>";
}

}
?>
<table border="20" class="register">

<tr class="heading">
<th colspan="3" class="tr">Login</th>
</tr>

<tr class="tr">
<td class="tr">Username</td>
<td class="tr">
<input type="text" name="username" placeholder="Username" class="td">
</td>
</tr>
<tr class="tr">
<td class="tr">Password</td>
<td class="tr">
<input type="password" name="password" placeholder="Password" class="td">
</td>

BCA Dept., SPKM-Jetpur | 56 A Project on: Docter Appointment


Booking System
</tr>
<tr class="tr">
<td colspan="3" align="center" class="tr">
<input type="submit" name="submit" value="submit" class="button">
</td>
</tr>
<tr class="tr">
<td colspan="3" align="center" class="tr">
<a href="index.php?page=forgetpassword" class="a" >Forget Password????</a><
/td>
</tr>
<tr class="tr">
<td colspan="3" align="center" class="tr">
<a href="index.php?page=registration1" class="a">Create new Account</a>
</td>
</tr>
</table>
</form>
</body>
</html>

Include/Logout.php

<?php
header("location:./index.php?page=login");
session_destroy();
?>

Action.checklogin.php

<?php
include("connection.php");
$username=$_REQUEST['username'];
$password=$_REQUEST['password'];
$query="select * from registration where username='$username' and password='$password'";
$result=mysql_query($query,$con);
if($row=mysql_fetch_array($result))
{
echo "login successfully";
BCA Dept., SPKM-Jetpur | 57 A Project on: Docter Appointment
Booking System
$_SESSION['username']=$row['username'];
$_SESSION['u_id']=$row['u_id'];
$_SESSION['u_type']=$row['u_type'];

header("location:../index.php?page=home&msg=1");
}
else
{
echo "first you are create a account";
header("location:../index.php?page=login&msg=2");
}
mysql_close();
?>

Action/connection.php
<?php
$con=mysql_connect("localhost","root","root");
$db=mysql_select_db("project");
session_start();
?>

Include/Changepassword.php

<script type="text/javascript" language="javascript">


function check_valid()
{
var NameRegex=/^[A-Za-z]{1,15}$/;
var oldpass=document.frmregistration.oldpass.value;
var newpass=document.frmregistration.newpass.value;
var confirmpass=document.frmregistration.confirmpass.value;
if(oldpass=="")
{
alert("Enter Your OldPassword");
document.frmregistration.oldpass.focus();
return false;
}
else if(!NameRegex.test(oldpass))
{

alert("Enter Only Proper OldPassword");


document.frmregistration.oldpass.focus();
return false;

BCA Dept., SPKM-Jetpur | 58 A Project on: Docter Appointment


Booking System
}
if(newpass=="")
{
alert("Enter Your NewPassword");
document.frmregistration.newpass.focus();
return false;
}
if(confirmpass=="")
{
alert("Enter Your ConfirmPassword");
document.frmregistration.confirmpass.focus();
return false;
}
}
</script>
<html>
<head>
</head>
<form name="frmregistration" action="action/changepass.php" method="post" onsubmit="return
check_valid();">
<?php
if(isset($_REQUEST['msg']))
{
if($_REQUEST['msg']==6)
{
echo"<h2 class='red'>invalid password</h2>";
}
}
?>
<body>
<table border=1 class="forpass">
<tr class="a">
<th colspan=2 class="textbox">Change Password</th>
</tr>
<tr class="a">
<td class="td" >Old Password</td>
<td><input type="password" name="oldpass"placeholder="Old Password" class="td" ></td>
</tr>
<tr class="a">
<td class="td" >New Password</td>
<td><input type="password" name="newpass"placeholder="New Password" class="td" ></td>
</tr>
<tr class="a">
<td class="td" >Confirm Password</td>
<td><input type="password" name="confirmpass" placeholder="Confirm Password" class="td"
></td>
</tr>
<tr class="a">

BCA Dept., SPKM-Jetpur | 59 A Project on: Docter Appointment


Booking System
<td colspan=2 align="center" class="button">
<input type="submit" name="submit" value="Submit" class="button">
<input type="button" name="clear" value="clear" class="button"></td>
</tr>
</table>
</form>
</body>
</html>

Action/changepass.php

<?php
include("connection.php");
$pass1=$_REQUEST['oldpass'];
$pass2=$_REQUEST['newpass'];
$pass3=$_REQUEST['confirmpass'];
if(isset($pass1)&&isset($pass2)&&isset($pass3))
{
session_start();
$u_id=$_SESSION['u_id'];
echo $query="select * from registration where u_id='$u_id'";
$result=mysql_query($query,$con);
while($row=mysql_fetch_array($result))
{

$pass=$row['password'];
if($pass2==$pass3)
{
if($pass1==$pass)
{
$query1="update registration set password='$pass2' where
u_id='$u_id'";
$res=mysql_query($query1,$con);
header("location:../index.php?page=home");
}
else
{
header("location:../index.php?page=changepassword & msg=6");

}
}
}
}

?>

BCA Dept., SPKM-Jetpur | 60 A Project on: Docter Appointment


Booking System
Include/Forgetpassword.php

<script type="text/javascript" language="javascript">


function check_valid()
{
var NameRegex=/^[A-Za-z]{1,15}$/;
var username=document.frmregistration.username.value;
if(username=="")
{
alert("Enter Your UserName");
document.frmregistration.username.focus();
return false;
}
else if(!NameRegex.test(username))
{
alert("Enter Only Character In UserName");
document.frmregistration.username.focus();
return false;
}

}
</script>
<html>
<head>
</head>
<body>
<form name="frmregistration" action="action/for1.php" method="POST " onsubmit="return
check_valid();">
<?php
if(isset($_REQUEST['msg']))
{
if($_REQUEST['msg']==3)
{
echo"<h2 class='red'>invalid UserName</h2>";
}

}
?>
<table border=1 class="forpass">
<tr class="a">
<th colspan=2 class="td" >Forget Password..??</th>
</tr>
<tr class="a">
<td class="td" >UserName</td>
BCA Dept., SPKM-Jetpur | 61 A Project on: Docter Appointment
Booking System
<td><input type="text" name="username" placeholder="UserName" class="td" ></td>
</tr>
<tr class="a">
<td colspan="2" align="center" class="button">
<input type="submit" name="submit" value="submit" class="button">
<input type="button" name="clear" value="clear" class="button"></td>
</tr>
</table>
</form>
</body>
</html>

Include/Forgetpassword1.php

<script type="text/javascript" language="javascript">


function check_valid()
{
var NameRegex=/^[A-Za-z]{1,15}$/;
var seq_ans=document.frmregistration.seq_ans.value;

if(seq_ans=="")
{
alert("Enter Your Answer");
document.frmregistration.seq_ans.focus();
return false;
}
else if(!NameRegex.test(seq_ans))
{
alert("Enter Only Character In Answer");
document.frmregistration.seq_ans.focus();
return false;
}

}
</script>
<?php
$con=mysql_connect("localhost","root","root");
$db=mysql_select_db("project",$con);
$username=$_REQUEST['username'];
if(isset($username))
{
$query="select * from registration where username='$username'";
$res=mysql_query($query,$con);
if($res)
{
BCA Dept., SPKM-Jetpur | 62 A Project on: Docter Appointment
Booking System
if($raw=mysql_fetch_array($res))
{
$result=$raw['sequrity_question'];
}
}
else
{
echo mysql_error();
}
}
?>
<html>
<head>
</head>
<body>
<form name="frmregistration" action="action/for2.php" method="POST" onsubmit="return
check_valid();">
<?php
if(isset($_REQUEST['msg']))
{
if($_REQUEST['msg']==4)
{
echo"<h2 class='red'>invalid Answer</h2>";
}

}
?>
<table border=1 class="forpass">
<tr class="a">
<th colspan=2 class="textbox">Forget Password..??</th>
</tr>
<tr class="a">
<td class="td" >Security Question:-<?php echo $result;?></td>
</tr>
<?php
echo"<input type='hidden' name='username' class='td' value='$username'>";
?>
<tr class="a"><td class="td">answer:<input type="text" name="seq_ans"class="td" > </td></tr>
<tr class="a">
<td colspan=2 align="center" class="button">
<input type="submit" name="submit" value="Next" class="button">
<input type="button" name="clear" value="clear" class="button"></td>
</tr>
</table>
</form>
</body>
</html>

BCA Dept., SPKM-Jetpur | 63 A Project on: Docter Appointment


Booking System
Include/forgetpassword2.php

<script type="text/javascript" language="javascript">


function check_valid()
{
var NameRegex=/^[A-Za-z]{1,15}$/;
var newpass=document.frmregistration.newpass.value;
var confirmpass=document.frmregistration.confirmpass.value;

if(newpass=="")
{
alert("Enter Your NewPassword");
document.frmregistration.newpass.focus();
return false;
}
if(confirmpass=="")
{
alert("Enter Your ConfirmPassword");
document.frmregistration.confirmpass.focus();
return false;
}
}
</script>
<html>
<head>
</head>
<body>
<form name="frmregistration" action="action/for3.php" method="POST" onsubmit="return
check_valid();">
<?php
if(isset($_REQUEST['msg']))
{
if($_REQUEST['msg']==5)
{
echo"<h2 class='red'>invalid Confirm Password</h2>";
}

}
?>
<table border=1 class="forpass">
<?php
$username=$_REQUEST['username'];
if(isset($username))
echo "<input type='hidden' name='username' value='$username'>";

BCA Dept., SPKM-Jetpur | 64 A Project on: Docter Appointment


Booking System
?>
<tr class="a">
<th colspan=2 class="textbox">Forget Password..??</th>
</tr>
<tr class="a">
<td class="td" >NewPassword</td>
<td><input type="password" name="newpass" placeholder="Question" class="td" ></td>
</tr>
<tr class="a">
<td class="td" >ConfirmPassword</td>
<td><input type="password" name="confirmpass" placeholder="Answer" class="td"></td></tr>
<tr class="a">
<td colspan=2 align="center" class="button">
<input type="submit" name="submit" value="Submit" class="button">
<input type="button" name="clear" value="clear" class="button">
</td>
</tr>
</table>
</body>
</html>

Action/for1.php
<?php
include("connection.php");
$username=$_REQUEST['username'];echo"hi";
if(isset($username))
{
$query="select * from registration where username='$username'";
$result=mysql_query($query,$con);
if($row=mysql_fetch_array($result))
{
echo $nm=$row['username'];
if($username==$nm)
{
header("location:../index.php?page=forgetpassword1&username=
$_REQUEST[username]");
}
else
{
header("location:../index.php?page=forgetpassword");
}
}

BCA Dept., SPKM-Jetpur | 65 A Project on: Docter Appointment


Booking System
else
{
header("location:../index.php?page=forgetpassword&msg=3");
}
}
?>

Action/for2.php
<?php
include("connection.php");
$seq_ans=$_REQUEST['seq_ans'];
$username=$_REQUEST['username'];
if(isset($seq_ans))
{
$query="select * from registration where username='$username'";
$result=mysql_query($query);
if($row=mysql_fetch_array($result))
{
$ans=$row['seq_ans'];
if($seq_ans==$ans)
{

header("location:../index.php?page=forgetpassword2&username=
$_REQUEST[username]");
}
else
{
header("location:../index.php?page=forgetpassword1&username=
$_REQUEST[username]&msg=4");
}
}
else
{

header("location:../index.php?page=forgetpassword1");
}
}
?>

BCA Dept., SPKM-Jetpur | 66 A Project on: Docter Appointment


Booking System
Action/for3.php

<?php
include("connection.php");
echo $username=$_REQUEST['username'];
echo $password=$_REQUEST['password'];
echo $pass1=$_REQUEST['newpass'];
echo $pass2=$_REQUEST['confirmpass'];
if(isset($pass1)&&($pass2))
{
if(($pass1)==($pass2))
{
$query="update registration set password='$pass2' where
username='$username'";
if(mysql_query($query))
{
header("location:../index.php?page=login");
}
else
{
echo mysql_error();
}
}
else
{
header("location:../index.php?page=forgetpassword2&msg=5");
}
}

?>

include/Registration.php

<script type="text/javascript" language="javascript">


function check_valid()
{
var NameRegex=/^[A-Za-z]{1,15}$/;
var NoRegex=/^\d{10}$/;
var AgeRegex=/^\d{2}$/;
var name=document.frmregistration.name.value;
var city=document.frmregistration.city.value;
var age=document.frmregistration.age.value;
var contact=document.frmregistration.contact.value;
var disease=document.frmregistration.disease.value;
BCA Dept., SPKM-Jetpur | 67 A Project on: Docter Appointment
Booking System
if(name=="")
{
alert("Enter Your Name");
document.frmregistration.name.focus();
return false;
}
else if(!NameRegex.test(name))
{
alert("Enter Only Character In Name");
document.frmregistration.name.focus();
return false;
}
if(city=="")
{
alert("Enter Your City");
document.frmregistration.city.focus();
return false;
}
else if(!NameRegex.test(city))
{
alert("Enter Only Character In City");
document.frmregistration.city.focus();
return false;
}
if(age=="")
{
alert("Enter Your Age");
document.frmregistration.age.focus();
return false;
}
else if(!AgeRegex.test(age))
{
alert("Enter Only Digit In Age");
document.frmregistration.age.focus();
return false;
}
if(contact=="")
{
alert("Enter Your Contact");
document.frmregistration.contact.focus();
return false;
}
else if(!NoRegex.test(contact))
{
alert("Enter Only 10 digit");
document.frmregistration.contact.focus();
return false;

BCA Dept., SPKM-Jetpur | 68 A Project on: Docter Appointment


Booking System
}
if(disease=="")
{
alert("Enter Your disease");
document.frmregistration.disease.focus();
return false;
}
else if(!NameRegex.test(disease))
{
alert("Enter Only Character In disease");
document.frmregistration.disease.focus();
return false;
}
}
</script>
<?php
include("connection.php");
$editmode=false;
if(isset($_REQUEST['u_id']))
{
$editmode=true;
$query="select * from registration where u_id=$_REQUEST[u_id]";
$result=mysql_query($query);
if($result)
{
$row=mysql_fetch_array($result);
}
else
{
echo mysql_error();
}
}
?>

<html>
<head>
</head>
<body>
<form name="frmregistration" action="action/register_insert.php" method="post" onsubmit="return
check_valid();">
<?php
if(isset($_REQUEST['msg']))
{
if($_REQUEST['msg']==7)
{
echo"<h1 class='red'>change Your UserName</h1>";

BCA Dept., SPKM-Jetpur | 69 A Project on: Docter Appointment


Booking System
}
}
?>
<table border="20" class="register">
<?php
if(isset($_REQUEST['u_id']))
{
echo "<input type='hidden' name='u_id' value=$_REQUEST[u_id]";
}
?>

<tr class="tr">
<th colspan=2 class="tr">RegistrationForm</th>
</tr>
<tr class="tr">
<td class="tr">First Name</td>
<td class="td">
<input type="text" name="firstnm" value='<?php if($editmode==true){echo
$row['firstnm'];}?>' placeholder="First Name" class="td">
</td>
</tr>
<tr class="tr">
<td class="tr" >Last Name</td>
<td class="td">
<input type="text" name="lastnm" value='<?php if($editmode==true){echo
$row['lastnm'];}?>' placeholder="Last Name" class="td">
</td>
</tr>

<tr class="tr">

<td class="tr">E-mail</td>

<td class="td">
<input type="text" name="emailid" value='<?php
if($editmode==true){echo $row['emailid'];}?>' placeholder="E-mail" class="td">
</td>

</tr>

<tr class="tr">
<td class="tr">UserName</td>
<td class="td">
<input type="text" name="username" value='<?php if($editmode==true){echo
$row['username'];}?>' placeholder="UserName" class="td">
</td>
</tr>

BCA Dept., SPKM-Jetpur | 70 A Project on: Docter Appointment


Booking System
<tr class="tr">
<td class="tr" >Password</td>
<td class="td">
<input type="password" name="password" value='<?php
if($editmode==true){echo $row['password'];}?>' placeholder="Password"
class="td">
</td>
</tr>
<tr class="tr">

<td class="tr" >Address</td>


<td class="td"><textarea name="address" placeholder="Address" class="td"><?php
if($editmode==true){echo $row['address'];}?></textarea>
</td>

</tr>

<tr class="tr">
<td class="tr" >City</td>
<td class="td">
<input type="text" name="city" value='<?php if($editmode==true){echo
$row['city'];}?>' placeholder="City" class="td">
</td>
</tr>
<tr class="tr">
<td class="tr">Gender</td>
<td>
<?php
if($editmode==true)
{
if($row['gender']=="male")
{
echo"<input type='radio' name='gender' value='male' checked='male'>male
<input type='radio' name='gender' value='female'>female";
}
else
{

echo"<input type='radio' name='gender' value='male' >male


<input type='radio' name='gender' value='female'
checked='female'>female";
}
}
else
{
echo"<input type='radio' name='gender' value='female' >female
<input type='radio' name='gender' value='male'>male";
}

BCA Dept., SPKM-Jetpur | 71 A Project on: Docter Appointment


Booking System
?>
</td>
</td>
</tr>
<tr class="tr">

<td class="tr" >Contact No</td>


<td class="td">
<input type="text" name="contact" value='<?php if($editmode==true){echo
$row['contact'];}?>' placeholder="Contact No" class="td">
</td>
</tr>
<tr class="tr">

<td class="tr" >Security Question</td>


<td><select name="sequrity_question" class="td">

<?php
if(editmode==true)
{
if($row['sequrity_question']=='What Is Your Best Friend Name')
{
echo "<option value='friend' selected>What Is Your Best Friend Name</option>";
}
else
{
echo "<option value='friend'>What Is Your Best Friend Name</option>";
}
if($row['sequrity_question']=='What Is Your Mother Name')
{
echo "<option value='mother' selected>What Is Your Mother Name</option>";
}
else
{
echo "<option value='mother'>What Is Your Mother Name</option>";
}
if($row['sequrity_question']=='What Is Your Father Name')
{
echo "<option value='father' selected>What Is Your Father Name</option>";
}
else
{
echo "<option value='father'>What Is Your Father Name</option>";
}
if($row['sequrity_question']=='What Is Your Hobby')
{
echo "<option value='hobby' selected>What Is Your Hobby</option>";

BCA Dept., SPKM-Jetpur | 72 A Project on: Docter Appointment


Booking System
}
else
{
echo "<option value='hobby'>What Is Your Hobby</option>";
}

}
?>
</select></td>
</tr>
<tr class="tr">
<td class="tr" >Answer</td>
<td class="td">
<input type="text" name="seq_ans" value='<?php if($editmode==true){echo
$row['seq_ans'];}?>' placeholder="Answer" class="td">
</td>
</tr>
<tr class="tr">
<?php
if($editmode==true)
{
echo"<td colspan=2 align='center' class='button'>
<input type='submit' name='submit' value='Edit' class='button'></td>";
}
else
{
echo"<td colspan=2 align='center' class='button'>
<input type='submit' name='submit' value='Add' class='button'></td>";
}
?>
</tr>
</table>
</form>
</body>
</html>

Register_add.php

<?php
include("connection.php");
if(isset($_REQUEST['u_id']))
{

echo $query="update registration set firstnm='$_REQUEST[firstnm]',


lastnm='$_REQUEST[lastnm]',
BCA Dept., SPKM-Jetpur | 73 A Project on: Docter Appointment
Booking System
emailid='$_REQUEST[emailid]',
username='$_REQUEST[username]',
password='$_REQUEST[password]',
address='$_REQUEST[address]',
city='$_REQUEST[city]',
gender='$_REQUEST[gender]' ,
contact='$_REQUEST[contact]'
,sequrity_question='$_REQUEST[sequrity_question]' ,
seq_ans='$_REQUEST[seq_ans]' where u_id='$_REQUEST[u_id]'";
$result=mysql_query($query);
if($result)
{
echo "grkfgjk";
header("location:../index.php?page=viewuser");
}
else
{
echo mysql_error();
}
}
else
{
include("connection.php");
$username=$_REQUEST['username'];
$query1="select * from registration where username='$username'";
$result1=mysql_query($query1);
if(mysql_num_rows($result1)>0)
{
header("location:../index.php?page=registration1&msg=7");
}
else
{
if(isset($_REQUEST['firstnm'])&&
isset($_REQUEST['lastnm'])&&
isset($_REQUEST['emailid'])&&
isset($_REQUEST['username'])&&
isset($_REQUEST['password'])&&
isset($_REQUEST['address'])&&
isset($_REQUEST['city'])&&
isset($_REQUEST['gender'])&&
isset($_REQUEST['contact'])&&
isset($_REQUEST['sequrity_question'])&&
isset($_REQUEST['seq_ans']))
{
$firstnm=$_REQUEST['firstnm'];
$lastnm=$_REQUEST['lastnm'];
$emailid=$_REQUEST['emailid'];
$username=$_REQUEST['username'];

BCA Dept., SPKM-Jetpur | 74 A Project on: Docter Appointment


Booking System
$password=$_REQUEST['password'];
$address=$_REQUEST['address'];
$city=$_REQUEST['city'];
$gender=$_REQUEST['gender'];
$contact=$_REQUEST['contact'];
$sequrity_question=$_REQUEST['sequrity_question'];
$seq_ans=$_REQUEST['seq_ans'];
//$u_id=$_SESSION['u_id'];

$query="insert into
registration(firstnm,lastnm,emailid,username,password,address,city,gende
r,contact,sequrity_question,seq_ans)values
('$firstnm','$lastnm','$emailid','$username','$password','$address','$city','$
gender' ,'$contact','$sequrity_question','$seq_ans')";

$result=mysql_query($query);
if($result)
{
header("location:../index.php?page=home1");

}
else
{
echo mysql_error();
}

}
else
{
header("location:../index.php?page=viewdocter");
}
}
}
?>

Register_delete

<?php
$con=mysql_connect("localhost","root","root");
$db=mysql_select_db("project");
$query="delete from registration where u_id=".$_REQUEST[u_id];
BCA Dept., SPKM-Jetpur | 75 A Project on: Docter Appointment
Booking System
//echo $query;
if(mysql_query($query,$con))
{

header("location:../index.php?page=viewregister");
}
else
{
echo mysql_error();
}
mysql_close();
?>

Include/feedback.php

<script type="text/javascript" language="javascript">


function check_valid1()
{
var NameRegex=/^[A-Za-z]{1,15}$/;
var f_name=document.frmregistration.f_name.value;
var f_type=document.frmregistration.f_type.value;
var f_feedback=document.frmregistration.f_feedback.value;

if(f_name=="")
{
alert("Enter Your UserName");
document.frmregistration.f_name.focus();
return false;
}
else if(!NameRegex.test(f_name))
{
alert("Enter Only Character In UserName");
document.frmregistration.f_name.focus();
return false;
}
if(f_type=="")
{
alert("Enter Your Type");
document.frmregistration.f_type.focus();
return false;
}
else if(!NameRegex.test(f_type))
{

alert("Enter Only Character In Type");


BCA Dept., SPKM-Jetpur | 76 A Project on: Docter Appointment
Booking System
document.frmregistration.f_type.focus();
return false;
}
if(f_feedback=="")
{
alert("Enter Your feedback");
document.frmregistration.f_feedback.focus();
return false;
}
}
</script>
<html>
<head>
<body>
<center>
<form name="frmregistration" action="action/feedback_add.php" method="post" onsubmit="return
check_valid1();">
<table border=3 class="register" >
<tr class="tr2">
<th colspan="3" class="td" ><h1>Feedback</h1></th>
</tr>
<tr class="tr2">
<td class="tr2">Name</td>
<td class="td" >
<input type="text" name="f_name" text="Name" class="td"
placeholder="Name">
</td>
</tr>
<tr class="tr2">
<td class="tr2">Type</td>
<td class="td" >
<input type="text" name="f_type" text="Type" class="td" placeholder="Type">
</td>
</tr>

<tr class="tr2">
<td class="tr2" >Feedback</td>
<td class="td" >
<textarea name="f_feedback" class="td" placeholder="Feedback"></textarea>
</td>
</tr>
<tr class="tr2">
<td colspan=2 align="center" class="button">
<input type="submit" name="submit" value="submit" class="button" >
<input type="button" name="clear" value="clear" class="button" >
</td>
</tr>
</table>

BCA Dept., SPKM-Jetpur | 77 A Project on: Docter Appointment


Booking System
</form>
</center>
</body>
</head>
</html>

Action/Feedback_add
<?php
include("connection.php");
$f_name=$_REQUEST['f_name'];
$f_type=$_REQUEST['f_type'];
$f_feedback=$_REQUEST['f_feedback'];
$query="insert into feedback(f_name,f_type,f_feedback)values
('$f_name','$f_type','$f_feedback')";
$result=mysql_query($query);
if($result)
{
header("location:../index.php?page=home1");

}
else
{
echo mysql_error();
}

?>

Action/feedback.delete

<?php
$con=mysql_connect("localhost","root","root");
$db=mysql_select_db("project");
$query="delete from feedback where f_id=".$_REQUEST[f_id];
//echo $query;
if(mysql_query($query,$con))
{

header("location:../index.php?page=viewfeedback");
}
else
{

BCA Dept., SPKM-Jetpur | 78 A Project on: Docter Appointment


Booking System
echo mysql_error();
}
mysql_close();
?>

Include/Docter.php

<?php
$con=mysql_connect("localhost","root","root");
$db=mysql_select_db("project");
echo "hi";
if(isset($_REQUEST['name'])&&
isset($_REQUEST['city'])&&
isset($_REQUEST['age'])&&
//isset($_REQUEST['gender']))&&
isset($_REQUEST['contact'])&&
isset($_REQUEST['disease'])&&
isset($_REQUEST['time'])&&
isset($_REQUEST['date'])&&
isset($_REQUEST['city']))
{
$d_name=$_REQUEST['name'];
$d_age=$_REQUEST['age'];
//$d_gender=$_REQUEST['gender'];
$d_contact=$_REQUEST['contact'];
$d_disease=$_REQUEST['disease'];
$d_time=$_REQUEST['time'];
$d_date=$_REQUEST['date'];
$d_city=$_REQUEST['city'];
echo $query="insert into
docter(d_name,d_age,d_contact,d_disease,d_time,d_date,d_city)values
('$d_name','$d_age','$d_contact','$d_disease','$d_time','$d_date','$d_city')
";
$result=mysql_query($query);
if($result)
{
header("location:../index.php?page=viewpatient");
}
}
else
{
echo mysql_error();
header("location:../index.php?page=viewdocter");
}

?>
BCA Dept., SPKM-Jetpur | 79 A Project on: Docter Appointment
Booking System
Include/Detail.php

<html>
<head>
</head>
<body>
<form name="frmregistration" method="post" >
<?php
if(isset($_REQUEST['msg']))
{
if($_REQUEST['msg']==0)
{
echo"<h1 class='red'>your Appoinment Time is already Booking</h1>";
}
}
?>
</form>
</body>
</html>
<?php
include("connection.php");
$query="select * from adddocter";
$result=mysql_query($query);
if($result)
{
echo"<table align=center >";
echo"<tr><th colspan=19 class=font><h1>Information</h1></th></tr>";
while($row=mysql_fetch_array($result))
{
echo"<td class=table1 rowspan=8><img src=upload/".$row[9]." width=500px
height=800px></img></td></tr>";
echo"<tr><td class=tr colspan=1><b>Dr.</b>".$row[1]."<br></td></tr>";
echo"<tr><td class=tr colspan=1><b>Age:</b>".$row[2]."</td></tr>";
echo"<tr><td class=tr colspan=1><b>qulification:</b>".$row[5]."</td></tr>";
echo"<tr><td class=tr colspan=1>".$row[8]."</td></tr>";
echo"<tr><td class=tr colspan=1><b>Charge:</b>".$row[11]."</td></tr>";
echo"<tr><td class=tr colspan=1><b>Information:</b>".$row[10]."</td></tr>";
echo"<tr><td><a href=index.php?page=admit1&d_id=".$row['d_id']."
class=font>Add Appinment</a><br></td></tr> ";
}
echo"</table>";
}
?>

BCA Dept., SPKM-Jetpur | 80 A Project on: Docter Appointment


Booking System
Include/docter_insert.php

<script type="text/javascript" language="javascript">


function check_valid()
{
var NameRegex=/^[A-Za-z]{1,15}$/;
var EmailRegex=/^[A-Za-z0-9._]*\@[A-Za-z]*\.[A-Za-z]{2,5}$/;
var NoRegex=/^\d{10}$/;
var AgeRegex=/^\d{2}$/;
var name=document.frmregistration.name.value;
var age=document.frmregistration.age.value;
var contact=document.frmregistration.contact.value;
var qulification=document.frmregistration.qulification.value;
var emailid=document.frmregistration.emailid.value;

if(name=="")
{
alert("Enter Your Name");
document.frmregistration.name.focus();
return false;
}
else if(!NameRegex.test(name))
{
alert("Enter Only Character In Name");
document.frmregistration.name.focus();
return false;
}
if(age=="")
{
alert("Enter Your Age");
document.frmregistration.age.focus();
return false;
}
else if(!AgeRegex.test(age))
{
alert("Enter Only Digit In Age");
document.frmregistration.age.focus();
return false;
}

if(contact=="")
{

BCA Dept., SPKM-Jetpur | 81 A Project on: Docter Appointment


Booking System
alert("Enter Your Contact");
document.frmregistration.contact.focus();
return false;
}
else if(!NoRegex.test(contact))
{
alert("Enter Only 10 digit");
document.frmregistration.contact.focus();
return false;
}

if(qulification=="")
{
alert("Enter Your qulification");
document.frmregistration.qulification.focus();
return false;
}
else if(!NameRegex.test(qulification))
{
alert("Enter Only character In Qulification");
document.frmregistration.qulification.focus();
return false;
}
if(emailid=="")
{
alert("Enter Your Email");
document.frmregistration.emailid.focus();
return false;
}
else if(!EmailRegex.test(emailid))
{
alert("Enter Proper Email");
document.frmregistration.emailid.focus();
return false;
}

}
</script>
<?php
include("connection.php");
$editmode=false;
if(isset($_REQUEST['d_id']))
{
$editmode=true;
$query="select * from adddocter where d_id=$_REQUEST[d_id]";
$result=mysql_query($query);
if($result)
{

BCA Dept., SPKM-Jetpur | 82 A Project on: Docter Appointment


Booking System
$row=mysql_fetch_array($result);
}
else
{
echo mysql_error();
}
}
?>

<html>
<head>
</head>
<body>
<form name="frmregistration" action="action/docter_add.php" method="post"
enctype="multipart/form-data" onsubmit="return check_valid();">
<table border=13 class="register">
<?php
if(isset($_REQUEST['d_id']))
{
echo "<input type='hidden' name='d_id' value=$_REQUEST[d_id]";
}
?>
<tr class="tr">
<th colspan=2 class="tr">Add Docter</th>
</tr>
<tr class="tr">
<td class="tr">Name</td>
<td class="td">
<input type="text" name="name" value='<?php
if($editmode==true){echo $row['name'];}?>' placeholder="Name" class="td">
</td>
</tr>
<tr class="tr">
<td class="tr" >Age</td>
<td class="td">
<input type="text" name="age" value='<?php
if($editmode==true){echo $row['age'];}?>' placeholder="Age" class="td">
</td>
</tr>
<tr class="tr">
<td class="tr">Gender</td>
<td>
<?php
if($editmode==true)
{
if($row['gender']=="male")

BCA Dept., SPKM-Jetpur | 83 A Project on: Docter Appointment


Booking System
{
echo"<input type='radio' name='gender' value='male' checked='male'>male
<input type='radio' name='gender' value='female'>female";
}
else
{

echo"<input type='radio' name='gender' value='male' >male


<input type='radio' name='gender' value='female' checked='female'>female";
}
}
else
{
echo"<input type='radio' name='gender' value='female' >female
<input type='radio' name='gender' value='male'>male";
}
?>
</td>
</tr>
<tr class="tr">
<td class="tr" >Contact No</td>
<td class="td">
<input type="text" name="contact" value='<?php
if($editmode==true){echo $row['contact'];}?>' placeholder="Contact No" class="td">
</td>
</tr>
<tr class="tr">
<td class="tr" >Qualification</td>
<td class="td">
<input type="text" name="qulification" value='<?php
if($editmode==true){echo $row['qulification'];}?>' placeholder="qulification" class="td">
</td>
</tr>
<tr class="tr">
<td class="tr">E-mail</td>
<td class="td">
<input type="text" name="emailid" value='<?php
if($editmode==true){echo $row['emailid'];}?>' placeholder="E-mail" class="td">
</td>
</tr>
<tr class="tr">
<td class="tr" >Address</td>
<td class="td">
<textarea name="address" placeholder="Address" class="td"><?php
if($editmode==true){echo $row['address'];}?></textarea>
</td>
</tr>
<tr class="tr">

BCA Dept., SPKM-Jetpur | 84 A Project on: Docter Appointment


Booking System
<td class="tr" >Type</td>
<td><select name="d_type" class="td">
<?php
if(editmode==true)
{
if($row['d_type']=='Dentist')
{
echo "<option value='Dentist' selected>Dentist</option>";
}
else
{
echo "<option value='Dentist'>Dentist</option>";
}
if($row['d_type']=='Saycologist')
{
echo "<option value='Saycologist' selected>Saycologist</option>";
}
else
{
echo "<option value='Saycologist'>Saycologist</option>";
}
if($row['d_type']=='Gaynec')
{
echo "<option value='Gaynec' selected>Gaynec</option>";
}
else
{
echo "<option value='Gaynec'>Gaynec</option>";
}
if($row['d_type']=='Children Docter')
{
echo "<option value='Children Docter' selected>Children Docter</option>";
}
else
{
echo "<option value='Children Docter'>Children Docter</option>";
}
if($row['d_type']=='Cadiyogram')
{
echo "<option value='Cadiyogram' selected>Cadiyogram</option>";
}
else
{
echo "<option value='Cadiyogram'>Cadiyogram</option>";
}
if($row['d_type']=='Aythopadic')
{
echo "<option value='Aythopadic' selected>Aythopadic</option>";

BCA Dept., SPKM-Jetpur | 85 A Project on: Docter Appointment


Booking System
}
else
{
echo "<option value='Aythopadic'>Aythopadic</option>";
}
}
?>
</select>
</td>
</tr>
<tr class="tr">
<td class="tr" > Select image to upload:</td>
<td><input type="file" name="file" id="file" class="tr">
<?php if($editmode==true){echo $row['file'];} ?>
</td>
</tr>
<tr class="tr">
<td class="tr" >Information</td>
<td class="td">
<textarea name="information" placeholder="inforamation" class="td"><?php
if($editmode==true){echo $row['information'];}?></textarea>
</td>
</tr>
<tr class="tr">
<td class="tr" >Charge</td>
<td class="td">
<input type="text" name="charge" value='<?php
if($editmode==true){echo $row['charge'];}?>' placeholder="charge" class="td">
</td>
</tr>
<tr class="tr">
<?php
if($editmode==true)
{
echo"<td colspan=2 align='center' class='button'><input type='submit' name='submit'
value='Edit' class='button'></td>";
}
else
{
echo"<td colspan=2 align='center' class='button'><input type='submit' name='submit'
value='Add' class='button'></td>";
}
?>
</tr>
</table>
</form>
</body>
</html>

BCA Dept., SPKM-Jetpur | 86 A Project on: Docter Appointment


Booking System
Action/Docter_add

<?php
include("connection.php");
if(isset($_REQUEST['d_id']))
{
$allowedExts=array("gif","jpeg","jpg","png");
echo $_FILES["file"]["name"];
$extension=end(explode(".",$_FILES["file"]["name"]));
echo $extension;
if((($_FILES["file"]["type"]=="image/gif")||
($_FILES["file"]["type"]=="image/jpeg")||
($_FILES["file"]["type"]=="image/jpg")||
($_FILES["file"]["type"]=="image/png")))
{
if($_FILES["file"]["error"] > 0)
{
echo"returne code:".$_FILES["file"]["error"]."<br>";
}
if(file_exists("upload/".$_FILES["file"]["name"]))
{
echo $_FILES["file"]["name"]."already exists";
}
else
{
move_uploaded_file($_FILES["file"]["tmp_name"],
"../upload/".$_FILES["file"]["name"]);
"stored in:"."upload/".$_FILES["file"]["name"];
}
}
else
{
echo mysql_error();
}
echo $query="update adddocter set name='$_REQUEST[name]',
age='$_REQUEST[age]',gender='$_REQUEST[gender]',
contact='$_REQUEST[contact]',qulification='$_REQUEST[qulification]',

emailid='$_REQUEST[emailid]',address='$_REQUEST[address]',d_type='$_REQUEST[d_typ
e]',file='".$_FILES["file"]["name"]."' where d_id='$_REQUEST[d_id]'";
echo $query;
$result=mysql_query($query);
if($result)
{
BCA Dept., SPKM-Jetpur | 87 A Project on: Docter Appointment
Booking System
header("location:../index.php?page=viewdocter");
}
else
{
echo mysql_error();
}
}
else
{
if(isset($_REQUEST['name'])&&
isset($_REQUEST['age'])&&
isset($_REQUEST['gender'])&&
isset($_REQUEST['contact'])&&
isset($_REQUEST['qulification'])&&
isset($_REQUEST['emailid'])&&
isset($_REQUEST['address'])&&
isset($_REQUEST['d_type']) )
{
$name=$_REQUEST['name'];
$age=$_REQUEST['age'];
$gender=$_REQUEST['gender'];
$contact=$_REQUEST['contact'];
$qulification=$_REQUEST['qulification'];
$emailid=$_REQUEST['emailid'];
$address=$_REQUEST['address'];
$d_type=$_REQUEST['d_type'];
$a_id=$_SESSION['a_id'];
$allowedExts=array("gif","jpeg","jpg","png");
$_FILES["file"]["name"];
$extension=end(explode(".",$_FILES["file"]["name"]));
echo $extension;
if((($_FILES["file"]["type"]=="image/gif")||
($_FILES["file"]["type"]=="image/jpeg")||
($_FILES["file"]["type"]=="image/jpg")||
($_FILES["file"]["type"]=="image/png")))
{

if($_FILES["file"]["error"] > 0)
{
echo"returne code:".$_FILES["file"]["error"]."<br>";
}
if(file_exists("upload/".$_FILES["file"]["name"]))
{
echo $_FILES["file"]["name"]."already exists";
}
else
{

BCA Dept., SPKM-Jetpur | 88 A Project on: Docter Appointment


Booking System
move_uploaded_file($_FILES["file"]["tmp_name"],
"../upload/".$_FILES["file"]["name"]);
"stored in:"."upload/".$_FILES["file"]["name"];
}
}
else
{
echo mysql_error();
}
$information=$_REQUEST['information'];
$charge=$_REQUEST['charge'];
echo $query="insert into
adddocter(name,age,gender,contact,qulification,emailid,address,d_type,file,infor
mation,charge)values
('$name','$age','$gender','$contact','$qulification','$emailid','$address','$d_type','
".$_FILES["file"]["name"]."','$information','$charge')";
$result=mysql_query($query);
if($result)
{
header("location:../index.php?page=viewdocter");

}
else
{
echo mysql_error();
}

}
else
{
header("location:../index.php?page=viewdocter");
}
}
?>

Action/Docter_delete.php

<?php
$con=mysql_connect("localhost","root","root");
$db=mysql_select_db("project");
$query="delete from adddocter where d_id=".$_REQUEST[d_id];
//echo $query;
if(mysql_query($query,$con))
{
header("location:../index.php?page=viewdocter");
BCA Dept., SPKM-Jetpur | 89 A Project on: Docter Appointment
Booking System
}
else
{
echo mysql_error();
}
?>

Include/admit1.php

<script type="text/javascript" language="javascript">


function check_valid()
{
var NameRegex=/^[A-Za-z]{1,15}$/;
var NoRegex=/^\d{10}$/;
var AgeRegex=/^\d{2}$/;
var name=document.frmregistration.name.value;
var city=document.frmregistration.city.value;
var age=document.frmregistration.age.value;
var contact=document.frmregistration.contact.value;
var disease=document.frmregistration.disease.value;

if(name=="")
{
alert("Enter Your Name");
document.frmregistration.name.focus();
return false;
}
else if(!NameRegex.test(name))
{
alert("Enter Only Character In Name");
document.frmregistration.name.focus();
return false;
}
if(city=="")
{
alert("Enter Your City");
document.frmregistration.city.focus();
return false;
}
else if(!NameRegex.test(city))
{
alert("Enter Only Character In City");
document.frmregistration.city.focus();
return false;
}
BCA Dept., SPKM-Jetpur | 90 A Project on: Docter Appointment
Booking System
if(age=="")
{
alert("Enter Your Age");
document.frmregistration.age.focus();
return false;
}
else if(!AgeRegex.test(age))
{
alert("Enter Only Digit In Age");
document.frmregistration.age.focus();
return false;
}
if(contact=="")
{
alert("Enter Your Contact");
document.frmregistration.contact.focus();
return false;
}
else if(!NoRegex.test(contact))
{
alert("Enter Only 10 digit");
document.frmregistration.contact.focus();
return false;
}
if(disease=="")
{
alert("Enter Your disease");
document.frmregistration.disease.focus();
return false;
}
else if(!NameRegex.test(disease))
{
alert("Enter Only Character In disease");
document.frmregistration.disease.focus();
return false;
}
}
</script>
<html>
<head>
</head>
<body>
<form name="frmregistration" action="action/appoinment_add.php" method="post"
onsubmit="return check_valid();">
<?php
if(isset($_REQUEST['msg']))
{
if($_REQUEST['msg']==0)

BCA Dept., SPKM-Jetpur | 91 A Project on: Docter Appointment


Booking System
{
echo"<h1 class='red'>your Appoinment Time is already Booking</h1>";
}
}
?>
<table border=1 class="register">
<tr class="tr">
<th colspan=2 class="tr">Add Apponment</th>
</tr>
<tr class="tr">
<td class="tr"> Name</td>
<td class="td">
<input type="text" name="name" placeholder="Name" class="td">
</td>
</tr>
<tr class="tr">
<td class="tr" >City</td>
<td class="td">
<input type="text" name="city" placeholder="City" class="td">
</td>
</tr>
<tr class="tr">
<td class="tr">Age</td>
<td class="td">
<input type="text" name="age" placeholder="Ages" class="td">
</td>
</tr>
<tr class="tr">
<td class="tr">Gender</td>
<td class="td">
<input type="radio" name="gender" value="male">male
<input type="radio" name="gender" value="female" >female
</td>
</tr>
<tr class="tr">
<td class="tr" >Contact No</td>
<td class="td">
<input type="text" name="contact" placeholder="Contact No" class="td">
</td>
</tr>
<tr class="tr">
<td class="tr">Disease</td>
<td class="td">
<input type="text" name="disease" placeholder="Decease" class="td">
</td>
</tr>
<tr class="tr">
<td class="tr" >Type</td>

BCA Dept., SPKM-Jetpur | 92 A Project on: Docter Appointment


Booking System
<td><select name="d_id" class="td">
<?php

include("connection.php");
echo $query="select * from adddocter where d_id=".$_REQUEST['d_id'];
echo $result=mysql_query($query,$con);

while($row=mysql_fetch_array($result))
{
echo $row['d_type'];
echo"<option value=".$row['d_id'].">".$row['d_type']."</option>";

?></select>
</td>
</tr>
<tr class="tr">
<td class="tr">Time</td>
<td><select name="time" class="td">
<option>--Select--</option>
<option> 10:00:00</option>
<option> 11:00:00</option>
<option> 12:00:00</option>
<option> 01:00:00 </option>
<option class="red"> Break</option>
<option> 03:00:00</option>
<option> 04:00:00</option>
<option> 05:00:00</option>
</select>
</td>
</tr>
<tr class="tr">
<td class="tr">Date</td>
<td colspan="3"><select name="date" class="td">
<option>year</option>
<option> 2001</option>
<option> 2002</option>
<option> 2003</option>
<option>2004</option>
<option> 2005</option>
<option>2006</option>
<option>2007</option>
<option> 2008</option>
<option> 2009</option>
<option>2010</option>
<option> 2011</option>
<option>2012</option>

BCA Dept., SPKM-Jetpur | 93 A Project on: Docter Appointment


Booking System
<option>2013</option>
<option> 2014</option>
<option> 2015</option>
<option>2016</option>
<option> 2017</option>
</select>

<select name="month" class="td">


<option>month</option>
<option> 1</option>
<option> 2</option>
<option> 3</option>
<option>4</option>
<option> 5</option>
<option>6</option>
<option>7</option>
<option> 8</option>
<option> 9</option>
<option>10</option>
<option> 11</option>
<option>12</option>
</select>
<select name="day" class="td">
<option>day</option>
<option> 1</option>
<option> 2</option>
<option> 3</option>
<option>4</option>
<option> 5</option>
<option>6</option>
<option>7</option>
<option> 8</option>
<option> 9</option>
<option>10</option>
<option> 11</option>
<option>12</option>
<option> 13</option>
<option> 14</option>
<option> 15</option>
<option>16</option>
<option> 17</option>
<option>18</option>
<option>19</option>
<option> 20</option>
<option> 21</option>
<option>22</option>
<option> 23</option>
<option>24</option>

BCA Dept., SPKM-Jetpur | 94 A Project on: Docter Appointment


Booking System
<option> 25</option>
<option>26</option>
<option>27</option>
<option> 28</option>
<option> 29</option>
<option>30</option>
<option> 31</option>
</select>
</td>
</tr>
<tr class="tr">
<td class="tr">charge</td>
<td class="td"><select name="charge" class="td">
<?php
include("connection.php");
echo $query="select * from adddocter where d_id=".$_REQUEST['d_id'];
$result=mysql_query($query,$con);
while($row=mysql_fetch_array($result))
{
echo"<option >".$row['charge']."</option>";
$charge=$row['charge'];
}
?></select>
</td>
</tr>
<tr class="tr">
<td colspan=2 align="center" class="button">
<input type="submit" name="submit" value="submit" class="button">
<input type="button" name="clear" value="clear" class="button">
</td>
</tr>
</table>
</form>
</body>
</html>

Action/Appointment_add.php
<?php
include("connection.php");
$time=$_REQUEST['time'];
$d_id=$_REQUEST['d_id'];
$query="select * from admitpatient where time='$time' && d_id=$d_id";
$result=mysql_query($query);
if(mysql_num_rows($result)>0)
BCA Dept., SPKM-Jetpur | 95 A Project on: Docter Appointment
Booking System
{
header("location:../index.php?page=detail&msg=0");
}
else
{
$name=$_REQUEST['name'];
$city=$_REQUEST['city'];
$age=$_REQUEST['age'];
$gender=$_REQUEST['gender'];
$contact=$_REQUEST['contact'];
$disease=$_REQUEST['disease'];
$time=$_REQUEST['time'];

echo $date=$_REQUEST['date']."-".$_REQUEST['month']."-".$_REQUEST['day'];
$d_id=$_REQUEST['d_id'];
list($h,$i,$s)=explode(":",$time);
list($y,$m,$d)=explode("-",$date);
$date_time=mktime($h,$i,$s,$m,$d,$y);
$status=$_REQUEST['status'];
$status1=$_REQUEST['status1'];
echo $a_u_id=$_SESSION['u_id'];

echo $query1="insert into


admitpatient(name,city,age,gender,contact,disease,time,date,d_id,date_time,stat
us,status1,a_u_i)values
('$name','$city',$age,'$gender','$contact','$disease','$time','$date'
,'$d_id','$date_time','pending','send','$a_u_id')";

$result1=mysql_query($query1);
if($result1)
{
include("connection.php");
echo $a_u_id=$_SESSION['u_id'];
echo $query="select * from admitpatient where
a_u_id=".$_SESSION['u_id'];
$result=mysql_query($query,$con);
while($row=mysql_fetch_array($result))
{
echo $row['a_id']."<br>";
header("location:../index.php?page=thank&a_id=".$row['a_id']);
}

}
else
{
echo mysql_error();
}

BCA Dept., SPKM-Jetpur | 96 A Project on: Docter Appointment


Booking System
}

?>

Include/Thank.php

<html>
<body>
<table>
<tr align="center">
<td class="red" colspan=2>
<br>
<?php
include("connection.php");
$query="select * from admitpatient where u_id=".$_SESSION['u_id'];
$result=mysql_query($query,$con);
if($row=mysql_fetch_array($result))
{
echo" Thank you ".$row['name']." <br>";
echo" Your Appoinment is ".$row['time']." Clock<br>";
echo"Please come 10 minite ago in Hospital";
}
?>
</td>
</tr>
</table>
</body>
</html>

Action/patient_delete

<?php
$con=mysql_connect("localhost","root","root");
$db=mysql_select_db("project");
$query="delete from admitpatient where a_id=".$_REQUEST[a_id];
//echo $query;
if(mysql_query($query,$con))
{

header("location:../index.php?page=viewpatient");
}

BCA Dept., SPKM-Jetpur | 97 A Project on: Docter Appointment


Booking System
else
{
echo mysql_error();
}
mysql_close();
?>

Include/viewuser.php

<?php
include("connection.php");
$_SESSION['u_id'];
$query="select * from registration where u_id=".$_SESSION['u_id'];
$result=mysql_query($query);
if($result)
{
//echo "connected";
echo "<table border=1 class='register'>";
echo "<tr><th colspan=13 class=register><h1>View Registration</th></tr>";
echo "<tr> <th class=tr>FirstName</th>
<th class=tr>LastName</th>
<th class=tr>E-Mail</th>
<th class=tr>UserName</th>
<th class=tr>PassWord</th>
<th class=tr>Address</th>
<th class=tr>City</th>
<th class=tr>Gender</th>
<th class=tr>ContactNo</th>
<th class=tr>Security Question</th>
<th class=tr>Answer</th>
<th class=tr colspan=2>Action</th>
</tr>";
echo "<tr>";
while($row=mysql_fetch_array($result))
{
echo "<td class=tr>".$row[2]."</td>";
echo "<td class=tr>".$row[3]."</td>";
echo "<td class=tr>".$row[4]."</td>";
echo "<td class=tr>".$row[5]."</td>";
echo "<td class=tr>".$row[6]."</td>";
echo "<td class=tr>".$row[7]."</td>";
echo "<td class=tr>".$row[8]."</td>";
echo "<td class=tr>".$row[9]."</td>";
echo "<td class=tr>".$row[10]."</td>";
BCA Dept., SPKM-Jetpur | 98 A Project on: Docter Appointment
Booking System
echo "<td class=tr>".$row[11]."</td>";
echo "<td class=tr>".$row[12]."</td>";
echo "<td class=tr>
<a href=action/register_delete.php?u_id=".$row['u_id']."><img
src='image/delete.png' height='40' width='40' onclick='return
f1()'></img></a>
</td>
<td align=right class=tr>
<a href=index.php?page=registration1&u_id=".$row['u_id']."><img
src='image/pencil.png' height='30' width='30' onclick='return
f2()'></img></a></td>";
echo "</tr>";
}
echo "</table>";
}
else
{
echo mysql_query();
}
?>

Include/Viewregister.php
<?php
include("connection.php");
$query="select * from registration";
$result=mysql_query($query);
if($result)
{
//echo "connected";
echo "<table border=1 class='register'>";
echo "<tr><th colspan=12 class=register><h1>View Registration</th></tr>";
echo "<tr> <th class=tr>FirstName</th>
<th class=tr>LastName</th>
<th class=tr>E-Mail</th>
<th class=tr>UName</th>
<th class=tr>PassWord</th>
<th class=tr>Address</th>
<th class=tr>City</th>
<th class=tr>Gender</th>
<th class=tr>ContactNo</th>
<th class=tr>Security Question</th>
<th class=tr>Answer</th>
<th class=tr>Action</th></tr>";
echo "<tr>";
while($row=mysql_fetch_array($result))

BCA Dept., SPKM-Jetpur | 99 A Project on: Docter Appointment


Booking System
{
echo "<td class=tr>".$row[2]."</td>";
echo "<td class=tr>".$row[3]."</td>";
echo "<td class=tr>".$row[4]."</td>";
echo "<td class=tr>".$row[5]."</td>";
echo "<td class=tr>".$row[6]."</td>";
echo "<td class=tr>".$row[7]."</td>";
echo "<td class=tr>".$row[8]."</td>";
echo "<td class=tr>".$row[9]."</td>";
echo "<td class=tr>".$row[10]."</td>";
echo "<td class=tr>".$row[11]."</td>";
echo "<td class=tr>".$row[12]."</td>";
echo "<td class=tr>
<a href=action/register_delete.php?u_id=".$row['u_id']."><img
src='image/delete.png' height='40' width='40'></img></a></td>";
echo "</tr>";
}
echo "</table>";
}
else
{
echo mysql_query();
}
?>

Include/Viewfeedback.php

<?php
include("connection.php");
$query="select * from feedback";
$result=mysql_query($query);
if($result)
{
//echo "connected";
echo "<table border=1 class=register>";
echo "<tr><th colspan=11 class=tr>View Feedback</th></tr>";
echo "<tr> <th class=tr>Name</th>
<th class=tr>Type</th>
<th class=tr>Feedback</th>
<th class=tr>Action</th></tr>";
echo "<tr>";
while($row=mysql_fetch_array($result))
{
echo "<td class=tr>".$row[1]."</td>";
echo "<td class=tr>".$row[2]."</td>";

BCA Dept., SPKM-Jetpur | 100 A Project on: Docter Appointment


Booking System
echo "<td class=tr>".$row[3]."</td>";
echo "<td class=tr>
<a href=action/feedback.delete.php?f_id=".$row['f_id']."><img
src='image/delete.png' height='30' width='30'></img></a>"."</td>";
echo "</tr>";
}
echo "</table>";
}
else
{
echo mysql_query();
}
?>

Include/Viewpatient.php

<?php
include("connection.php");
$tim=time('h:i:s');
$dat=date('y-m-d');
list($h,$i,$s)=explode(":",$tim);
list($y,$m,$d)=explode("-",$dat);
$z1=mktime($y,$m,$d)."<br>";
$a=$z1-86400;
$query="select * from admitpatient where date_time > $a";
$result=mysql_query($query);
if($result)
{
//echo "connected";
echo "<table border=1 class=register>";
echo "<tr><th colspan=11 class=tr>View Patient</th></tr>";
echo "<tr> <th class=tr>name</th>
<th class=tr>city</th>
<th class=tr>age</th>
<th class=tr>gender</th>
<th class=tr>contact</th>
<th class=tr>disease</th>
<th class=tr>time</th>
<th class=tr>date</th>
<th class=tr>Action</th>
</tr>";
echo "<tr>";
while($row=mysql_fetch_array($result))
BCA Dept., SPKM-Jetpur | 101 A Project on: Docter Appointment
Booking System
{

echo "<td class=tr>".$row['name']."</td>";


echo "<td class=tr>".$row[2]."</td>";
echo "<td class=tr>".$row[3]."</td>";
echo "<td class=tr>".$row[4]."</td>";
echo "<td class=tr>".$row[5]."</td>";
echo "<td class=tr>".$row[6]."</td>";
echo "<td class=tr>".$row[7]."</td>";
echo "<td class=tr>".$row[8]."</td>";
$send=$row['status1'];
if($send=="send")
{
echo "<td class=tr><a href=action/patient_delete.php?a_id=".$row['a_id'].">
<img src='image/delete.png' height='30' width='30'></img></a>
<a class='a' href= index.php?page=admit&a_id=".$row['a_id'].">$send</a>"
."</td>";
}
else
{
echo "<td class=tr><a
href=action/patient_delete.php?a_id=".$row['a_id'].">
<img src='image/delete.png' height='30' width='30'></img></a>
<u>$send<u>"
."</td>";
}
echo "</tr>";
}
echo "</table>";
}
else
{
echo mysql_query();
}
?>

Include/Admit.php

<?php
include("connection.php");
$editmode=false;
if(isset($_REQUEST['a_id']))
{
$editmode=true;
$query="select * from admitpatient where a_id=$_REQUEST[a_id]";
$result=mysql_query($query);
BCA Dept., SPKM-Jetpur | 102 A Project on: Docter Appointment
Booking System
if($result)
{
$row=mysql_fetch_array($result);
}
else
{
echo mysql_error();
}
}
?>
<html>
<head>
</head>
<body>
<form action="action/docter.php" method="post">
<table border=1 class="register">
<?php
if(isset($_REQUEST['a_id']))
{
echo "<input type='hidden' name='a_id' value=$_REQUEST[a_id]";
}
?>
<tr class="tr">
<th colspan=2 class="tr">Add Apponment</th>
</tr>
<tr class="tr">
<td class="tr"> Name</td>
<td class="td"><input type="text" name="name" value='<?php
if($editmode==true){echo $row['name'];}?>' placeholder="Name" class="td"></td>
</tr>
<tr class="tr">
<td class="tr" >City</td>
<td class="td"><input type="text" name="city" value='<?php
if($editmode==true){echo $row['city'];}?>' placeholder="City" class="td"></td>
</tr>
<tr class="tr">
<td class="tr">Age</td>
<td class="td"><input type="text" name="age" value='<?php
if($editmode==true){echo $row['age'];}?>' placeholder="Ages" class="td"></td>
</tr>
<tr class="tr">
<td class="tr">Gender</td>
<td>
<?php
if($editmode==true)
{
if($row['gender']=="male")
{

BCA Dept., SPKM-Jetpur | 103 A Project on: Docter Appointment


Booking System
echo"<input type='radio' name='gender' value='male' checked='male'>male
<input type='radio' name='gender' value='female'>female";
}
else
{

echo"<input type='radio' name='gender' value='male' >male


<input type='radio' name='gender' value='female'
checked='female'>female";
}
}
else
{
echo"<input type='radio' name='gender' value='female' >female
<input type='radio' name='gender' value='male'>male";
}
?>
</td>
</tr>
<tr class="tr">
<td class="tr" >Contact No</td>
<td class="td"><input type="text" name="contact" value='<?php
if($editmode==true){echo $row['contact'];}?>' placeholder="Contact No" class="td"></td>
</tr>
<tr class="tr">
<td class="tr">Disease</td>
<td class="td"><input type="text" name="disease" value='<?php
if($editmode==true){echo $row['disease'];}?>' placeholder="Decease" class="td"></td>
</tr>
<tr class="tr">
<td class="tr">Time</td>
<td class="td"><input type="text" name="time" value='<?php
if($editmode==true){echo $row['time'];}?>' placeholder="Time" class="td"></td>
</tr>
<tr class="tr">
<td class="tr">Date</td>
<td class="td"><input type="text" name="date" value='<?php
if($editmode==true){echo $row['date'];}?>' placeholder="Date" class="td"></td>
</tr>
<tr class="tr">
<td class="tr">city</td>
<td class="td"><input type="text" name="city" value='<?php
if($editmode==true){echo $row['city'];}?>' placeholder="Date" class="td"></td>

</tr>
<tr class="tr">
<td colspan="2" align="center" class="tr">
<?php

BCA Dept., SPKM-Jetpur | 104 A Project on: Docter Appointment


Booking System
$query1="select * from admitpatient where a_id=".$_REQUEST['a_id'];
$result1=mysql_query($query1,$con);
if($row1=mysql_fetch_array($result1))
{
$row1['a_id'];
}
echo"<a class=tr1 href=index.php?page=sending&a_id=".$row1['a_id'].">send</a>";
?>
</td>
</tr>
</table>
</form>
</body>
</html>

Include/sending.php

<?php
//echo "dfgdg";
include("connection.php");
$query="update admitpatient set status1='sent' where a_id=".$_REQUEST['a_id'];
echo $res=mysql_query($query);
if($res)
{

header("location:index.php?page=viewpatient");
}
else
{
echo mysql_error();
}
?>

Include/Viewdocter.php

<?php
include("connection.php");
$query="select * from adddocter";
$result=mysql_query($query);
if($result)
{
BCA Dept., SPKM-Jetpur | 105 A Project on: Docter Appointment
Booking System
//echo "connected";
echo "<table border=1 class=register>";
echo "<tr><th colspan=11 class=tr>Doctor Details</th></tr>";
echo "<tr><th colspan=12 align=right class=tr>
<a href='index.php?page=docter_insert'><img src='image/add.png' height='30'
width='30'></a>";
echo "<tr> <th class=tr>Name</th>
<th class=tr>Age</th>
<th class=tr>Gender</th>
<th class=tr>contact</th>
<th class=tr>Qualification</th>
<th class=tr>E-Mail</th>
<th class=tr>Address</th>
<th class=tr>Type</th>
<th class=tr>Charge</th>
<th colspan=2 class=tr>Action</th>
</tr>";
echo "<tr>";
while($row=mysql_fetch_array($result))
{
echo "<td class=tr>".$row[1]."</td>";
echo "<td class=tr>".$row[2]."</td>";
echo "<td class=tr>".$row[3]."</td>";
echo "<td class=tr>".$row[4]."</td>";
echo "<td class=tr>".$row[5]."</td>";
echo "<td class=tr>".$row[6]."</td>";
echo "<td class=tr>".$row[7]."</td>";
echo "<td class=tr>".$row[8]."</td>";

echo "<td class=tr>".$row[11]."</td>";


echo "<td align=right class=tr>
<a href=index.php?page=docter_insert&d_id=".$row['d_id'].">
<img src='image/pencil.png' height='30' width='30'></img></a></td>
<td class=tr>
<a href=action/docter_delete.php?d_id=".$row['d_id'].">
<img src='image/delete.png' height='30' width='30'></img></a></td>";
echo "</tr>";
}
echo "</table>";
}
else
{
echo mysql_error();
}
?>

BCA Dept., SPKM-Jetpur | 106 A Project on: Docter Appointment


Booking System
Include/Admit2.php

<?php
include("connection.php");
$query="select * from admitpatient where status1='sent' ";
$result=mysql_query($query);
if($result)
{
//echo "connected";
echo "<table border=1 class=register>";
echo "<tr><th colspan=11 class=tr>View Patient</th></tr>";
echo "<tr> <th class=tr>name</th>
<th class=tr>city</th>
<th class=tr>age</th>
<th class=tr>gender</th>
<th class=tr>contact</th>
<th class=tr>disease</th>
<th class=tr>time</th>
<th class=tr>date</th>
</tr>";
echo "<tr>";
while($row=mysql_fetch_array($result))
{
echo "<td class=tr>".$row[1]."</td>";
echo "<td class=tr>".$row[2]."</td>";
echo "<td class=tr>".$row[3]."</td>";
echo "<td class=tr>".$row[4]."</td>";
echo "<td class=tr>".$row[5]."</td>";
echo "<td class=tr>".$row[6]."</td>";
echo "<td class=tr>".$row[7]."</td>";
echo "<td class=tr>".$row[8]."</td>";
//echo "<td class=tr>".$row[9]."</td>";
echo "</tr>";
}
echo "</table>";
}
else
{
echo mysql_query();
}
?>

Include/Manageadmin.php

<?php
BCA Dept., SPKM-Jetpur | 107 A Project on: Docter Appointment
Booking System
include ("connection.php");
$query="select * from admin";
$result=mysql_query($query);
if($result)
{
echo"<table border=1 align=center class='register'>";
echo"<tr><th colspan=5 class=tr><h1>Admin</h1></th></tr>";
echo "<tr><td colspan=4 class=tr1 align=right>
<a class=tr1 href=index.php?page=admin >addadmin</a></td></tr>";
echo"<tr><td class=tr><h2>name</h2></td><td class=tr><h2>Email_id</h2></td>
<td class=tr><h2>Contact</h2></td><td colspan=2 class=tr><h2>action</h2></td></tr>";
echo"<tr>";
while($row=mysql_fetch_array($result))
{
if($row['id']%2==0)
{
echo"<td class=tr>".$row['name']."</td>";
echo"<td class=tr>".$row['email_id']."</td>";
echo"<td class=tr>".$row['contact']."</td>";

echo"<td class=tr><a href=action/deleteadmin.php?id=".$row['id'].">


<img src='image/delete.png' height='40' width='40'></img>
<a href=index.php?page=admin&id=".$row['id']." >
<img src='image/pencil.png' height='30' width='30' onclick='return
f1()'></img></a
</td>";
echo"</tr>";
}
else
{
echo"<td class=tr>".$row['name']."</td>";
echo"<td class=tr>".$row['email_id']."</td>";
echo"<td class=tr>".$row['contact']."</td>";
echo"<td class=tr>
<a href=action/deleteadmin.php?id=".$row['id']." onclick='check_valid()'>
<img src='image/delete.png' height='40' width='40'></img>
<a href=index.php?page=admin&id=".$row['id']." onclick='check_valid1()'>
<img src='image/pencil.png' height='30' width='30'></img></a>
</td>";
echo"</tr>";
}
}
echo"</table>";
}
else
{
echo mysql_error();
}

BCA Dept., SPKM-Jetpur | 108 A Project on: Docter Appointment


Booking System
?>

Include/Appoinment.php

<?php
include("connection.php");
$query="select * from adddocter";
$result=mysql_query($query,$con);
echo"<form class='float-right'><table border='3' class='register'>
<th class='a'>Docter Appoinment</th>";
echo"<tr class='tr'><td><a class='a' href='index.php?page=appoinment&d_id=d_id'>
viewall</a></td></tr>";
while($row=mysql_fetch_array($result))
{
echo"<tr class='tr'><td >
<a class='a'href=index.php?page=appoinment&d_id=".$row['d_id'].">".$row['d_type']."</a></td>
</tr>";
}
echo "<input type='hidden' value='adddocter' name='page' id='page'>";
echo"</table></form>";
include("connection.php");
if(isset($_REQUEST['d_id']))
{
$tim=time('h:i:s');
$dat=date('y-m-d');
list($h,$i,$s)=explode(":",$tim);
list($y,$m,$d)=explode("-",$dat);
$z1=mktime($y,$m,$d);
$a=$z1-86400;
$query1="select * from admitpatient where date_time>$a && d_id=".$_REQUEST['d_id'];
$result1=mysql_query($query1,$con);
echo"<table border=3 class='register'>";
echo "<tr><th colspan=11 class=register>View Appoinment</th></tr>";
echo "<tr> <th class=tr>name</th>
<th class=tr>city</th>
<th class=tr>age</th>
<th class=tr>gender</th>
<th class=tr>contact</th>
<th class=tr>disease</th>
<th class=tr>time</th>
<th class=tr>date</th>
<th class=tr>Action</th>
</tr>";
while($row1=mysql_fetch_array($result1))
{
BCA Dept., SPKM-Jetpur | 109 A Project on: Docter Appointment
Booking System
echo "<tr>";
if($row1[0]%2==0)
{
echo "<td class=tr>".$row1['name']."</td>";
echo "<td class=tr>".$row1['city']."</td>";
echo "<td class=tr>".$row1['age']."</td>";
echo "<td class=tr>".$row1['gender']."</td>";
echo "<td class=tr>".$row1['contact']."</td>";
echo "<td class=tr>".$row1['disease']."</td>";
echo "<td class=tr>".$row1['time']."</td>";
echo "<td class=tr>".$row1['date']."</td>";
$status=$row1['status'];
if($status=="pending")
{
echo"<td class=tr>
<a class=a href=index.php?page=patient_detail&a_id=
".$row1['a_id'].">$status</a>"."</td>";
}
else
{
echo"<td class=a><u>$status</u></td>";
}
}
else
{
echo "<td class=tr>".$row1['name']."</td>";
echo "<td class=tr>".$row1['city']."</td>";
echo "<td class=tr>".$row1['age']."</td>";
echo "<td class=tr>".$row1['gender']."</td>";
echo "<td class=tr>".$row1['contact']."</td>";
echo "<td class=tr>".$row1['disease']."</td>";
echo "<td class=tr>".$row1['time']."</td>";
echo "<td class=tr>".$row1['date']."</td>";
$status=$row1['status'];
if($status=="pending")
{
echo"<td class=tr>
<a class=a href=index.php?page=patient_detail&
a_id=".$row1['a_id'].">$status</a>"."</td>";
}
else
{
echo"<td class=a><u>$status</u></td>";
}
}
}
echo"</tr>";
echo"</table>";

BCA Dept., SPKM-Jetpur | 110 A Project on: Docter Appointment


Booking System
}
else
{
echo mysql_error();
}

?>

Include/Patient_detail.php

<?php
include("connection.php");
$editmode=false;

if(isset($_REQUEST['a_id']))
{
$editmode=true;
$query="select * from admitpatient where a_id=$_REQUEST[a_id]";
$result=mysql_query($query);
if($result)
{
$row=mysql_fetch_array($result);
}
else
{
echo mysql_error();
}
}
?>
<html>
<head>
</head>
<body>
<form action="include/appoinment.php" method="post">
<table border=1 class="register">
<?php
if(isset($_REQUEST['a_id']))
{
echo "<input type='hidden' name='a_id' value=$_REQUEST[a_id]";
}
?>
<tr class="tr">
<th colspan=2 class="tr">Add Appoinment</th>
</tr>
<tr class="tr">

BCA Dept., SPKM-Jetpur | 111 A Project on: Docter Appointment


Booking System
<td class="tr"> Name</td>
<td class="td"><input type="text" name="name" value='<?php
if($editmode==true){echo $row['name'];}?>' placeholder="Name" class="td"></td>
</tr>
<tr class="tr">
<td class="tr" >City</td>
<td class="td"><input type="text" name="city" value='<?php
if($editmode==true){echo $row['city'];}?>' placeholder="City"
class="td"></td>
</tr>
<tr class="tr">
<td class="tr">Age</td>
<td class="td"><input type="text" name="age" value='<?php
if($editmode==true){echo $row['age'];}?>' placeholder="Ages" class="td"></td>
</tr>
<tr class="tr">
<td class="tr">Gender</td>
<td>
<?php
if($editmode==true)
{
if($row['gender']=="male")
{
echo"<input type='radio' name='gender' value='male' checked='male'>male
<input type='radio' name='gender' value='female'>female";
}
else
{

echo"<input type='radio' name='gender' value='male' >male


<input type='radio' name='gender' value='female'
checked='female'>female";
}
}
else
{
echo"<input type='radio' name='gender' value='female' >female
<input type='radio' name='gender' value='male'>male";
}
?>
</td>
</tr>
<tr class="tr">
<td class="tr" >Contact No</td>
<td class="td"><input type="text" name="contact" value='<?php
if($editmode==true){echo $row['contact'];}?>' placeholder="Contact No" class="td"></td>
</tr>
<tr class="tr">

BCA Dept., SPKM-Jetpur | 112 A Project on: Docter Appointment


Booking System
<td class="tr">Disease</td>
<td class="td"><input type="text" name="disease" value='<?php
if($editmode==true){echo $row['disease'];}?>' placeholder="Decease" class="td"></td>
</tr>
<tr class="tr">
<td class="tr">Time</td>
<td class="td"><input type="text" name="time" value='<?php
if($editmode==true){echo $row['time'];}?>' placeholder="Time" class="td"></td>
</tr>
<tr class="tr">
<td class="tr">Date</td>
<td class="td"><input type="text" name="date" value='<?php
if($editmode==true){echo $row['date'];}?>' placeholder="Date" class="td"></td>
</tr>
<tr class="tr">
<td align="center" colspan="2" class="tr">
<?php
$query1="select * from admitpatient where a_id=".$_REQUEST['a_id'];
$result1=mysql_query($query1,$con);
if($row1=mysql_fetch_array($result1))
{
$row1['a_id'];
}
echo"<a class=a href=index.php?page=approvingpage&a_id=".$row1['a_id'].">OK</a></td>";
?>
</tr>
</table>
</form>
</body>
</html>

Include/Approvingpage.php

<?php
include("connection.php");
$query="update admitpatient set status='approved' where a_id=".$_REQUEST['a_id'];
echo $res=mysql_query($query);
if($res)
{
header("location:index.php?page=appoinment");
}
else
{
echo mysql_error();

BCA Dept., SPKM-Jetpur | 113 A Project on: Docter Appointment


Booking System
Chapter-7:- Testing

(7.1) Testing Concept:-

1) ROLE OF TESTING:-

A project is like a load trip,some projects are simple &routine like driving
Store in broad daylight.But most project work doing are driving a truck off road
Mountains at night those project needs headlights as light the way.

You illuminate the road ahead so the programmer & managers,however


They bicker over the map,can at least see where they are what they about to
Run over & how close they are to chiff.The details mission of the group varies from
company.Behind those details there is common factor.

Testing is done to find information critical decisions about the project or


Product that are made on basic of that information.

2)TESTING
Once source code has been generated software must be tested to uncover many
Errors possible before to customer.

Its goal is design series of test cases that have likelihood of finding errors
Softwaretechnique provide systematic guideance for designing

Test that:-
a) Exercise internal logic of software components.
b) Exercise the I/p & O/p domains of program functional behavior & performance.
Testing phase must maximize the number of errors detected & minimize
Number of test cases.

BCA Dept., SPKM-Jetpur | 114 A Project on: Docter Appointment


Booking System
Testing is of two types
a) Functional
b) Structure

Functional testing has


a) Equivalence class portion.
b) Boundary value analysis.
c) Cause effect graphing.

Structural testing has


a) Control Flow Based Criteria.
b) Data Flow Based Testing.
c) Mutation Testing.

CODING STANDARD:-

1)TESTING OBJECTIVES
 Testing is process of executing program with the internet of finding an error.
 A good test case is one that has high probability of finding an as yet undiscovered error.
 A successful test is one that uncovered as an undiscovered error.

White Box Testing:-

 White Box Testing sometimes called glass box testing is test case design method
that uses control structure of procedure design to derive test cases.Using
White Box testing methods derives cases that:-

Interface Testing:-

 This is concerned with both program spection and program implementation .this
type Of testing is particularly important for object oriented system.

BCA Dept., SPKM-Jetpur | 115 A Project on: Docter Appointment


Booking System
(7.2) Test Cases:-

Critearea
Input1:character or number.
Input2:character with number.
Input3:character with number and symbol.
Input3:character with spacial symbol.

Registration:-

FieldName Input1 Input2 Input3 Input4


Firstname Yes No No No
Lastnmae Yes No No No
Emailed yes Yes Yes Yes
Username Yes No No No
Password Yes Yes Yes Yes
Address Yes Yes Yes Yes
City Yes No No No
Contact Yes No No No
Seq_ans Yes No No No
Result Pass Fail Fail Fail

Feedback:-

fieldname Input1 Input2 Input3 Input4


F_name Yes No No No
F_type Yes No No No
F_feedback Yes No No No
Result Pass Fail Fail Fail

Admitpatient:-

FieldName Input1 Input2 Input3 Input4


name Yes No No No
city Yes No No No
age Yes No No No
contact Yes No No No
disease Yes No No No
Result Pass Fail Fail Fail

BCA Dept., SPKM-Jetpur | 116 A Project on: Docter Appointment


Booking System
Adddocter:-

FieldName Input1 Input2 Input3 Input4


Name Yes No No No
Age Yes No No No
Contact Yes No No No
qulification Yes No No Yes
Emailed Yes Yes Yes Yes
Address Yes Yes Yes Yes
information Yes No No Yes
Charge Yes No No No
Result Pass Fail Fail Fail

Admin:-

FieldName Input1 Input2 Input3 Input4


Name Yes No No No
Emailed Yes Yes Yes Yes
Contact Yes No No No
Result Pass Fail Fail Fail

Login:-

fieldname Input1 Input2 Input3 Input4


Username Yes No No No
Password Yes Yes Yes Yes
Result Pass Fail Fail Fail

Forgetpassword:-

fieldname Input1 Input2 Input3 Input4


Username Yes No No No
Answer Yes No No No
Newpassword Yes Yes Yes Yes
Confirmpassword Yes Yes Yes Yes
Result Pass Fail Fail Fail

BCA Dept., SPKM-Jetpur | 117 A Project on: Docter Appointment


Booking System
Changepassword:-

Fieldname Input1 Input2 Input3 Input4


Oldpassword Yes Yes Yes Yes
Newpassword Yes Yes Yes Yes
Confirmpassword Yes Yes Yes Yes
Result Pass Pass Pass Pass

BCA Dept., SPKM-Jetpur | 118 A Project on: Docter Appointment


Booking System
Chapter-8:- Enhancements

(8.1) Advantages:-

Maintain whole system through two Admin.


Routin work is done more effecitively is less time.
No extra supported staff needed.
It is also less costly and more effective system.
The safety of data is increased to provide utilities.
Less expensive
Powerfull searching.
Easy to use for all user

(8.2)Limitation:-

The docter on-line it is no meant of the serius problem.


Online payment is not allowed.

(8.3) Future Scope:-

We want to do following enhancements in projects.


Some of limitation is removed by using some advance technology infuture.
There are also adding features are provide to admin, so functionality of working
will becomes fast.
Reminder facility will be providing to user and admin.
Online help can be introduced into the system.
I will try to better facility of our website.

BCA Dept., SPKM-Jetpur | 119 A Project on: Docter Appointment


Booking System
Chapter-9:- Enhancements

Web site

w3 schoool

Books

PHP

BCA Dept., SPKM-Jetpur | 120 A Project on: Docter Appointment


Booking System

You might also like