PHP Projects

Hospital Management System Using PHP With Source Code

Project: Hospital Management System

– To Download It For Free (Scroll Down)

Features :

  1. Login Systems (Patients/Admin/Doctor)
  2. Book Appointment
  3. Manage Patients, Doctors
  4. Add Doctor Specialization

Here, User has to Login as Patient, Doctor OR Admin to use the system. From Patient’s login, a user can Book an appointment with any doctor and check appointment history. From Doctor’s login, a user can view Appointments. From Admin’s login, a user has access to each and everything. Admin can manage doctors, patients, Add Doctor specialization, and check Doctor’s and Patient’s session logs. This system makes easy management of hospital for the patients as well as doctors.The design of this project is pretty simple and the user won’t find it difficult to understand, use and navigate.

How To Run?

You’ll need XAMP Server or WAMP Server. Put the file inside “c:/wamp/www/” or “c:/xampp/htdocs/”. Go To “localhost/phpmyadmin” in any browser and create Database (name according to SQL file).In that Database, Import the SQL file and finally go to URL: “http://localhost/file_name/phpfilename
Don’t Forget To create a database and import SQL file to run.


This Post Has 154 Comments

  1. magoiga Reply

    what is the username and password for the system?

  2. hassan Reply

    There is an error in the database I am not able to import it.

  3. Jalil Reply

    Should i make the database to the myphp local host?

  4. xtatic studios Reply

    great everything works fine guys… am i free to make it even more epic by developing it further?

  5. Arnav Kumar Reply

    I m encountering d error of could not connect database.. help me

    • Naseeb Bajracharya Reply

      we have provided the database file. you should create a database naming (according to SQL file) and import that database. without creating a database the project won’t run!!

  6. Farjana Islam Reply

    when i click patient , doctor or admin link then the system says – could not select database….what can i do ? I have import the sql file

  7. Farjana Islam Reply


  8. Vivek Mishra Reply

    Sir please help. I have created the database with hms name. But when I go to patient login I am not able to see the login screen or login into dashboard.

  9. Ankit Reply

    hii…when i run my doctor file in a localhost…i get an error called FATAL ERROR…those error i mentioned below… can u please help me to solve this error…

    Fatal error: Uncaught Error: Call to undefined function mysql_connect() in C:xampphtdocsHospitalhospitalhmsdoctorincludeconfig.php:6 Stack trace: #0 C:xampphtdocsHospitalhospitalhmsdoctorindex.php(3): include() #1 {main} thrown in C:xampphtdocsHospitalhospitalhmsdoctorincludeconfig.php on line 6

    • Naseeb Bajracharya Reply

      configure in config.php, insert your own Localhost’s username, password
      and if it still doesn’t work then you must be using PHP 7, try installing PHP 5.6.3

  10. teknopen Reply

    the datepicker in appointment form does not appear calendar

  11. teknopen Reply

    This apps is really help me and it is greatly free…

    Can u help me on this:
    1: how can patient, doctor and admin upload their picture
    2. how can i make the profile picture appear based on the user itself


  12. Anto Reply

    This is good work, but the code is outdated, and the JS is unresponsive. I am trying to fix as best I can, there is more to be done, however, all in all good work.

  13. digu Reply

    Ty Admin

  14. Karamat Reply

    when i click patient , doctor or admin link then nothing show ….what can i do ? I have import the sql file

  15. Karamat Reply

    i am still not able to see login screen…system display is blank…tell me what should i do ??

  16. sahana Reply

    i can’t get the source code of hospital management system

  17. Olive Reply

    I really like this project hospital management system, I have followed all the instruction given in “read me first” but when I click the links in patient and admin login, I get a blank page and for the link in doctor I get an error which I don’t know how to describe.
    please any help.
    thank you

    • Naseeb Bajracharya Reply

      The database name should be “hms” not hms.sql.
      Sorry for this mistake in “README.txt” file!

      After setting the database connection, if it displays a blank page then configure in config.php, insert your own Localhost’s username, password
      and if it still doesn’t work then you must be using PHP 7, try installing PHP 5.6.3

  18. supriya Reply

    Database is getting connected but the login pages is not fetching the username and password from the database . getting invalid username and password

  19. supriya Reply

    Database is getting connected but the login pages are not fetching username and password from the database,getting invalid username and password.

  20. rounak Reply

    once i have created the database in php net what to do next

  21. cet Reply

    the data is accessible from database but the data that i am inserting into database is not getting updated what to do????

  22. kanaka Reply

    Fatal error: Uncaught Error: Call to undefined function mysql_connect() in C:xampphtdocshospitalhospitalhmsdoctorincludeconfig.php:6 Stack trace: #0 C:xampphtdocshospitalhospitalhmsdoctorindex.php(3): include() #1 {main} thrown in C:xampphtdocshospitalhospitalhmsdoctorincludeconfig.php on line 6

    iam getting this error in this code can u please help me

  23. quan Reply

    help the home page is working but the other child pages are not

    • Fabian Ros Reply

      check your database connections with a proper database name. Recommended PHP version: 5.6.3

  24. Shivani Kotian Reply

    After typing in the URL http://localhost/hospital/hms/user-login.php nothing shows up, please help

  25. jun Reply

    Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /storage/ssd5/433/6406433/public_html/hms/doctor/include/config.php:6 Stack trace: #0 /storage/ssd5/433/6406433/public_html/hms/doctor/index.php(3): include() #1 {main} thrown in /storage/ssd5/433/6406433/public_html/hms/doctor/include/config.php on line 6

    • Fabian Ros Reply

      mysql_connect() has been removed in PHP 7.
      You can use mysqli_connect()
      or simply switch to PHP 5.6.3

  26. Soso Reply

    how many tables in database ??

  27. Sha Reply

    Hi..i need your appointment history not working very well.After make a booking appointment the details not appear in history.i already follow your code

  28. Mahesh Reply

    Hi bro i have one doubt in this project,
    if i open all logins in single *tab* its works perfectly but the thiung is if i login patient and doctor at a time in 2 tabs one is patient and another is doctor then its not retrieve the data and its not showing username in header also kindly help me bro asap.

  29. maurice Reply

    good morning, i have created the db named hms, and has imported the sql file, however, if try to visit the url i’m getting the http 404 error message

  30. Karn Reply

    Sql file is not open why?

  31. Frank Reply

    I can not login to the patient, doctors and admin, what can I do???

  32. Pramod Maurya Reply

    your code is not working in PHP 7.1.7 version but its working in 5.6.39 . kindly tell me solution for this.

  33. Peter_Maina Reply

    Have you used bootstrap in this project?

  34. Peter_Maina Reply

    Have you used any bootstrap?

  35. mambo254 Reply

    Hello Hi, I am having troubles with the project i get errors while uploading the sql file please assist me on this

  36. [email protected] Reply

    after i imported the sql file in the database
    it is not’s like “could not find database”

  37. [email protected] Reply

    we cant see the appoinment history or patient history

  38. saranya Reply

    I’m getting a error while importing sql file

  39. sonu Reply

    Hello Sir,Can you send me project report plzzz.
    my Email ID is :- [email protected]

  40. ilker Reply

    Hi, Is this project written for MySQLi version. I’m connecting the database. But user entries have errors due to mysqli

  41. Anjali Saini Reply

    database is create then import the file but still that given the error
    Fatal error: Uncaught Error: Call to undefined function mysql_connect() in C:xampphtdocshospital1hospitalhmsdoctorincludeconfig.php:6 Stack trace: #0 C:xampphtdocshospital1hospitalhmsdoctorindex.php(3): include() #1 {main} thrown in C:xampphtdocshospital1hospitalhmsdoctorincludeconfig.php on line 6)
    i also check the connection file but there is no error find

  42. love soni Reply

    project is not working i import sql file but project is not working i click “click hear” button then showing me code

  43. om samanta Reply

    sir when i click on the admin login and patients then it does not working ,means it will not open the next page……..most problem is that when i click on doctors login then i have seen the error……,,,,,,so please check it….
    error is—–Fatal error: Uncaught Error: Call to undefined function mysql_connect() in C:xampphtdocsvirus8hmsdoctorincludeconfig.php:6 Stack trace: #0 C:xampphtdocsvirus8hmsdoctorindex.php(3): include() #1 {main} thrown in C:xampphtdocsvirus8hmsdoctorincludeconfig.php on line 6

  44. kathleen marcelo Reply


    why is it that when i try to open the admin/doctor/patients this error “localhost is currently unable to handle this request.” is showing up. can you please advise what i need to do?

  45. clifford Reply

    I am done with the creation of the database but can’t log on to the dashboard

  46. Mukesh Kumar Reply

    plz send synopsis hospital management system

  47. oluwatimilehin Reply

    hi, am having issue logining in, pls can you help with that

  48. ibrahimanam Reply

    I keep having Invalid username or password error when I login into (doctor login and patient login) but admin login works fine… tried the username given in READMEFILE but still doesn’t work… I think patient and doctor login was not implanted in the project.. please reply

    • ibrahimanam Reply

      database saved as has not has.sql also using php 5.6.3 still not working

  49. vinu Reply

    pls helf database not connect

  50. Dan Reply

    I want the doctors to book appointments for their patients, how can I enable that feature? Thank you

  51. Abdul Reply

    Pls I need report
    [email protected]

  52. karl balbuena Reply

    Hello sir.. thank you for this…
    i would like to raise my problem..
    when I open the Patient and in the Admin Login, nothing will be displayed and in the doctors Login I have errors. can you please help me.. thank you in advanced, I hope you can help me.

  53. Kiran Reply

    I am not able to view the pages of login of any User Patient/Admin/Doctor. I am getting an empty page.
    or Fatal error: Uncaught Error: Call to undefined function mysql_connect() in C:\xampp\htdocs\hospital\hms\doctor\include\config.php:6 Stack trace: #0 C:\xampp\htdocs\hospital\hms\doctor\index.php(3): include() #1 {main} thrown in C:\xampp\htdocs\hospital\hms\doctor\include\config.php on line 6

    Please suggest.

  54. Clara Reply

    what is the username and password for the system?

  55. Dillip Sahoo Reply

    Sir , please send me the project report to me . [email protected]

  56. Immanuel Sanjai kumar Reply

    i could not find database // error

  57. Kiran Reply

    not able to view the login page of any users.

  58. Nikhil B Reply

    I really thank you for the valuable info on this great subject and look forward to more great posts. Thanks a lot for enjoying this beauty article with me. I am appreciating it very much! Looking forward to another great article. Good luck to the author! All the best! 

    Php projects with source code

    Online examination system in php

    Student management system in php

    Php projects for students

    Free source code for academic

    Academic projects provider in nashik

    Academic project free download

  59. Michael Reply

    When I try to access the URL after importing the SQL file it gives me error 404

  60. Oun Ali Syed Reply

    Fatal error: Uncaught Error: Call to undefined function mysql_connect() in C:\xampp\htdocs\Hospital Mgmt PHP\hospital\hms\doctor\include\config.php:6 Stack trace: #0 C:\xampp\htdocs\Hospital Mgmt PHP\hospital\hms\doctor\index.php(3): include() #1 {main} thrown in C:\xampp\htdocs\Hospital Mgmt PHP\hospital\hms\doctor\include\config.php on line 6

  61. vipul nadge Reply

    anyone help mi in this project..
    how many databases are created in this projects..
    please send mi some data of database

  62. Mattias Berg Reply

    Hi, anf thanks for this exelent php system. But how do i do to make a new table? Is there any realationships between the tables, I can´t see any connections.

  63. ajay Reply

    i can not login to the patient, doctor, admin what should i do?

Leave a Reply

Your email address will not be published. Required fields are marked *