Hospital Management System in PHP and MySQL with Source Code
What is a Hospital Management System?
A Hospital Management System in PHP is a web-based application designed to manage hospital processes, such as maintaining patient details, doctors’ schedules, appointments, prescription management, billing, and more. This application is built using PHP, MySQL, HTML, CSS, JavaScript, and Bootstrap.
The Hospital Management System project would be quite beneficial for students enrolled in courses such as BCA, MCA, B.Tech, or Computer Science for choosing their final year projects.
The Hospital Management System project consists of three modules, namely Admin, Doctor, and Patient modules.
Technologies Used
| Technology | Purpose |
|---|---|
| PHP | Backend |
| MySQL | Database |
| HTML/CSS | Frontend |
| Bootstrap | UI Design |
| JavaScript | Interactivity |
| XAMPP | Local Server |
Project Demo
| View Demo | Installation Guide |
System Features
Hospital Management System is a web application for the hospital which manages doctors and patients. In this project, we use PHP and MySQL database.
The entire project mainly consists of 3 modules, which are
- Admin module
- User module
- Doctor module
Admin Features
- Dashboard: In this section, the admin can view the Patients, Doctors, Appointments and New queries.
- Doctors: In this section, the admin can add doctors’ specialisation and manage doctors (Add/Update).
- Users: In this section, the admin can view users’ details (who take online appointments) and also has the right to delete irrelevant users.
- Patients: In this section, the admin can view patients’ details.
- Appointment History: In this section, the admin can view appointment history.
- Contact us Queries: In this section, the admin can view queries which are sent by users.
- Doctor Session Logs: In this section, admin can see login and logout times of the doctor.
- User Session Logs: In this section, admin can see login and logout times of the user.
- Reports: In this section, the admin can view reports of patients for particular periods.
- Patient Search: In this section, the admin can search for a patient with the help of patient’s name and mobile number.
Admin can also change his/her own password.
Patient Features
- Dashboard: In this section, patients can view the his/her profile, appointments, and book an appointment.
- Book Appointment: In this section, the patient can book his/her appointment.
- Appointment History: In this section, Patients can see his/her own appointment history.
- Medical History: In this section, Patients can see his/her own appointment history.
User can update his/her profile, change their password and recover their password.
Doctor Features
- Dashboard: In this section, the doctor can view his/her own profile and online appointments.
- Appointment History: In this section, the doctor can see the patient’s appointment history.
- Patients: In this section, the doctor can manage patients (Add/Update).
- Search: In this section, the doctor can search for a patient with the help of patient’s name and mobile number.
Doctors can also update their profile, change their password and recover their password.
Hospital Management System Workflow
Patient Registration
↓
Patient Login
↓
Appointment Booking
↓
Doctor Consultation
↓
Prescription Generation
↓
Medical Record Storage
Comparison Between Manual and Automated Hospital Management
| Feature | Manual System | Hospital Management System |
|---|---|---|
| Patient Records | Stored in paper files | Stored digitally in a centralized database |
| Appointment Booking | Manual scheduling by staff | Automated online appointment management |
| Report Generation | Time-consuming and error-prone | Instant report generation |
| Security | Higher risk of data loss | Role-based secure access |
| Data Retrieval | Difficult and slow | Quick search and retrieval |
| Prescription Management | Paper prescriptions | Digital prescription records |
| Scalability | Limited | Easily scalable for growing hospitals |
| Operational Efficiency | Low | High |
Project Output Screens
Home Page

Patient Registration

Admin Dashboard

Patient Medical History

How to Run a Hospital Management System Project
Step 1: Download the Source Code
Download the Hospital Management System source code and extract the ZIP file.
Step 2: Copy Project Folder
Copy the project folder (hospital) into the htdocs directory of XAMPP.
Step 3: Create Database
Open phpMyAdmin and create a database named hms.
Step 4: Import SQL File
Import the SQL file included in the downloaded package.
Step 5: Configure Database Connection
Update database credentials inside the configuration file.
Step 6: Run the Project
Open your browser and access:
http://localhost/hms
The Hospital Management System dashboard will now be available.
Demo Login Credentials
To help users explore the Hospital Management System without creating new accounts, the following demo credentials are provided for testing different user roles.
| User Role | Username / Email | Password |
|---|---|---|
| Administrator | admin | Test@12345 |
| Patient | johndoe12@test.com | Test@123 |
| Doctor | anujk123@test.com | Test@123 |
Disclaimer : This project is not for Commercial use.
Hospital Management System Project Report and PPT
Download Hospital Management System Report and PPT in Rs 199 / $2.10
Frequently Asked Questions
Yes. The project is ideal for BCA, MCA, B.Tech, and diploma students because it covers PHP, MySQL, authentication, CRUD operations, and database management.
The project uses PHP, MySQL, HTML, CSS, JavaScript, Bootstrap, and Apache server through XAMPP.
Yes. Developers can integrate Razorpay, Stripe, or PayPal APIs to support online payments.
Yes. The complete source code can be downloaded from the project page.
Future enhancements include telemedicine integration, AI-powered diagnosis assistance, online payments, electronic health records, and cloud deployment.
This project demonstrates the practical implementation of CRUD operations, authentication systems, database management, appointment scheduling, and role-based access control, making it an excellent academic project.
