From 83c7a005c19640cff64dc29d00aa778adf1cbae2 Mon Sep 17 00:00:00 2001 From: mrprojectsr Date: Thu, 7 Oct 2021 01:28:47 -0500 Subject: [PATCH] readme, docker and detect unauthorized access --- .dockerignore | 3 + Dockerfile | 48 +++++++ DockerfileEntryPoint.sh | 60 +++++++++ README.md | 223 ++++++++++++++++++------------- admin-panel.php | 144 +++++++++++--------- admin-panel1.php | 105 ++++++++------- contact.php | 12 +- myhmsdb.sql => database/dump.sql | 0 docker-compose.yml | 36 +++++ doctor-panel.php | 141 +++++++------------ func.php | 10 +- func1.php | 16 +-- func2.php | 8 +- func3.php | 2 +- include/config.php | 10 +- newfunc.php | 4 +- prescribe.php | 32 +++-- search.php | 6 +- 18 files changed, 517 insertions(+), 343 deletions(-) create mode 100644 .dockerignore create mode 100644 Dockerfile create mode 100644 DockerfileEntryPoint.sh rename myhmsdb.sql => database/dump.sql (100%) create mode 100644 docker-compose.yml diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..ab9ce0c --- /dev/null +++ b/.dockerignore @@ -0,0 +1,3 @@ +/moodledata +/mysqldata +.git diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..b9dd04f --- /dev/null +++ b/Dockerfile @@ -0,0 +1,48 @@ +FROM ubuntu + +ARG DEBIAN_FRONTEND=noninteractive + +RUN apt-get update +RUN apt-get install -y software-properties-common +RUN add-apt-repository -y ppa:ondrej/php +RUN apt-get update -y + +RUN apt-get install -y apache2 +RUN apt-get install -y php7.2 libapache2-mod-php7.2 php7.2-cli php7.2-common php7.2-mbstring php7.2-gd php7.2-intl php7.2-xml php7.2-mysql php7.2-mcrypt php7.2-zip + +RUN mkdir -p /var/www/html +COPY . /var/www/html + +WORKDIR /var/www/html + +## configure apache + +# remove ubuntu apache default page +RUN rm /var/www/html/index.html + +ENV CUSTOM_DOCUMENT_ROOT=\/var\/www\/html + +# fix warning +# AH00558: apache2: Could not reliably determine the server's fully qualified domain name, +# using 172.17.0.2. Set the 'ServerName' directive globally to suppress this message +RUN echo "ServerName localhost" >> /etc/apache2/apache2.conf + +RUN echo "" >> /etc/apache2/apache2.conf +RUN echo " Options Indexes FollowSymLinks" >> /etc/apache2/apache2.conf +RUN echo " AllowOverride All" >> /etc/apache2/apache2.conf +RUN echo " Require all granted" >> /etc/apache2/apache2.conf +RUN echo "" >> /etc/apache2/apache2.conf +RUN a2enmod rewrite + +RUN mkdir -p /var/log/apache2/ +RUN chmod -R 750 /var/log/apache2/ +RUN chown -R www-data:www-data /var/log/apache2/ +RUN chown -R www-data:www-data /var/www/html/ +RUN chmod -R 755 /var/www/html/ + +# final docker configuration + +COPY DockerfileEntryPoint.sh /usr/local/bin/DockerfileEntryPoint.sh +RUN chmod 744 /usr/local/bin/DockerfileEntryPoint.sh + +ENTRYPOINT ["DockerfileEntryPoint.sh"] diff --git a/DockerfileEntryPoint.sh b/DockerfileEntryPoint.sh new file mode 100644 index 0000000..0d9ed7a --- /dev/null +++ b/DockerfileEntryPoint.sh @@ -0,0 +1,60 @@ +#!/bin/bash +set -e + +mkdir -p /var/log/apache2/ +chmod -R 750 /var/log/apache2/ + +ENV_FILE=env +ENV_HOME=/var + +function echo_log { + DATE='date +%Y/%m/%d:%H:%M:%S' + echo `$DATE`" $1" +} + +function download_env_variables { + + if [[ "x${CONFIGURATOR_GET_VARIABLES_FULL_URL}" = "x" || "x${CONFIGURATOR_AUTH_HEADER}" = "x" ]]; then + echo_log "" + echo_log "Configurator variables are not provided. Variables will not be downloaded" + return 0 + fi + + echo_log "" + echo_log "starting to download environment variables" + http_response=$(curl -s -o curl_response_file -w "%{http_code}" -H "$CONFIGURATOR_AUTH_HEADER" ${CONFIGURATOR_GET_VARIABLES_FULL_URL}) + + echo_log "download status: $http_response" + if [ $http_response == "200" ]; then + mv curl_response_file $ENV_HOME/$ENV_FILE + echo_log "exporting Environment Variables" + source $ENV_HOME/$ENV_FILE + else + + echo_log "download response: $(cat curl_response_file)" + echo_log "new environment variables could not be obtained from remote service" + + if [ -e $ENV_HOME/$ENV_FILE ]; then + echo_log "exporting old env variables" + source $ENV_HOME/$ENV_FILE + else + echo_log "environment file not found: $ENV_HOME/$ENV_FILE" + echo_log "if variables will not download, don't pass CONFIGURATOR_ variables and try again." + exit 1 + fi + fi + +} + +function start { + php -v + source /etc/apache2/envvars + exec apache2 -DFOREGROUND +} + + +######################## +# Scripts starts here +######################## +download_env_variables +start diff --git a/README.md b/README.md index bd5227a..1562a77 100644 --- a/README.md +++ b/README.md @@ -17,44 +17,7 @@ Live Demo : [Hospital Management System - 000webhost by Kishan](https://kishan07 7. Addition of more details on payment - such as date of the payment made, amount paid, etc. 8. Implementation of export button in admin module to export all details to an excel sheet. -## Prerequisites -1. Install XAMPP web server -2. Any Editor (Preferably VS Code or Sublime Text) -3. Any web browser with latest version - -## Languages and Technologies used -1. HTML5/CSS3 -2. JavaScript (to create dynamically updating content) -3. Bootstrap (An HTML, CSS, and JS library) -4. XAMPP (A web server by Apache Friends) -5. Php -6. MySQL (An RDBMS that uses SQL) -7. TCPDF (to generate PDFs) - -## Steps to run the project in your machine -1. Download and install XAMPP in your machine -2. Clone or download the repository -3. Extract all the files and move it to the 'htdocs' folder of your XAMPP directory. -4. Start the Apache and Mysql in your XAMPP control panel. -5. Open your web browser and type 'localhost/phpmyadmin' -6. In phpmyadmin page, create a new database from the left panel and name it as 'myhmsdb' -7. Import the file 'myhmsdb.sql' inside your newly created database and click ok. -8. Open a new tab and type 'localhost/foldername' in the url of your browser -9. Hurray! That's it! - -### SOFTWARES USED - - XAMPP was installed on the Ubuntu 19.04 machine and APACHE2 Server and MySQL were initialized. And, files were built inside opt/lampp/htdocs/myhmsp - - Sublime Text 3.2 was used as a text editor. - - Google Chrome Version 77.0.3865.90 was used to run the project (localhost/myhmsp was used as the url). - - -### Starting Apache And MySQL in XAMPP: - The XAMPP Control Panel allows you to manually start and stop Apache and MySQL. To start Apache or MySQL manually, click the ‘Start’ button under ‘Actions’. - - -

- -## GETTING INTO THE PROJECT: +## Getting into the project Hospital Management System in php and mysql. This system has a ‘Home’ page from where the patient, doctor & administrator can login into their accounts by toggling the tabs accordingly. Fig 1.1 shows the ‘Home’ page of our project. ![image](https://user-images.githubusercontent.com/36665975/66569676-ad2d8800-eb89-11e9-94e5-ea407622a1fe.png) @@ -72,12 +35,14 @@ The ‘Home’ page consists of 3 modules: 2. Doctor Module 3. Admin Module -### Patient Module: +### Patient Module -       This module allows patients to create their account, book an appointment to see a doctor and see their appointment history. - The registration page(in the home page itself) asks patients to enter their First Name, Last Name, Email ID, Contact Number, Password and radio buttons to select their gender. - - ![image](https://user-images.githubusercontent.com/36665975/66570027-5b393200-eb8a-11e9-9e97-088630b5e583.png) +> Sample user: nancy@gmail.com password: nancy123 + +      This module allows patients to create their account, book an appointment to see a doctor and see their appointment history. +The registration page(in the home page itself) asks patients to enter their First Name, Last Name, Email ID, Contact Number, Password and radio buttons to select their gender. + +![image](https://user-images.githubusercontent.com/36665975/66570027-5b393200-eb8a-11e9-9e97-088630b5e583.png) Once the patient has created his/her own account after clicking the ‘Register’ button, then he will be redirected to his/her Dashboard(Fig 1.5). @@ -87,18 +52,18 @@ The Dashboard page allows patients to perform two operations: **1. Book his/her appointment:** -       Here, the patients can able to book their appointments to see a doctor. The appointment form(Fig 1.6) requires patients to select the doctor that they want to see, Date and Time that they want to meet with the doctor. The consultancy fee will be shown accordingly to the patient as it was already determined by the doctor. +      Here, the patients can able to book their appointments to see a doctor. The appointment form(Fig 1.6) requires patients to select the doctor that they want to see, Date and Time that they want to meet with the doctor. The consultancy fee will be shown accordingly to the patient as it was already determined by the doctor. ![image](https://user-images.githubusercontent.com/36665975/66570202-c256e680-eb8a-11e9-8839-6c7fef68ac4c.png) -After clicking on the ‘Create new entry’ button, the patient will receive an alert that acknowledges the successful appointment of the patient.(See Fig 1.7) +After clicking on the ‘Create new entry’ button, the patient will receive an alert that acknowledges the successful appointment of the patient.(See Fig 1.7) ![image](https://user-images.githubusercontent.com/36665975/66570280-ec100d80-eb8a-11e9-96c2-08e5441954d0.png) **2. View patients’ Appointment History:** -       Here, the patient can see their appointment history which contains Doctor Name, Consultancy Fee, Appointment Date and Time.(See Fig 1.8). - +      Here, the patient can see their appointment history which contains Doctor Name, Consultancy Fee, Appointment Date and Time.(See Fig 1.8). + ![image](https://user-images.githubusercontent.com/36665975/66570349-0ea22680-eb8b-11e9-94fe-22a86070a274.png) Once the patient has logged out of his account, if he wants to go into his account again, he can login his account, instead of register his account again. Fig 1.9 shows the login page. @@ -108,32 +73,36 @@ Clicking on ‘Login’ button will redirect the patient to his dashboard page w This is how the patient module works. On the whole, this module allows patients to register their account or login their account(if he/she has one), book an appointment and view his/her appointment history. -### Doctor Module: +### Doctor Module + +> Sample user: Tiwary password: tiwary123 + +      The doctors can login into their account which can be done by toggling the tab from ‘Patient’ to ‘Doctor’. Fig 1.10 shows the login form for a doctor. Registration of a doctor account can be done only by admin. We will discuss more about this in Admin Module. -       The doctors can login into their account which can be done by toggling the tab from ‘Patient’ to ‘Doctor’. Fig 1.10 shows the login form for a doctor. Registration of a doctor account can be done only by admin. We will discuss more about this in Admin Module. - ![image](https://user-images.githubusercontent.com/36665975/66570609-8bcd9b80-eb8b-11e9-8099-9f285aa7fe0f.png) Once the doctor clicking the ‘Login’ button, they will be redirected to their own dashboard which is shown in Fig 1.11 ![image](https://user-images.githubusercontent.com/36665975/66570642-a0119880-eb8b-11e9-8d23-be898e1bfa29.png) -In this page, doctor can able to see their appointments which has been booked by the patients. Fig 1.12 shows the appointment of the doctor ‘Ganesh’ which has been booked by the patient ‘Kenny Sebastian’ (Fig 1.6). This means that the doctor ‘Ganesh’ will have an appointment with the patient ‘Kenny Sebastian’ on 10-10-2019 10AM. +In this page, doctor can able to see their appointments which has been booked by the patients. Fig 1.12 shows the appointment of the doctor ‘Ganesh’ which has been booked by the patient ‘Kenny Sebastian’ (Fig 1.6). This means that the doctor ‘Ganesh’ will have an appointment with the patient ‘Kenny Sebastian’ on 10-10-2019 10AM. ![image](https://user-images.githubusercontent.com/36665975/66570704-be779400-eb8b-11e9-92ae-21d8e0e4aba4.png) In real-time, the doctors will have thousands of appointments. It will be easier for a doctor to search for appointment in the case of more appointments. To make it easier, I have a ‘Search’ box in the navigation bar (See Fig 1.12) which allows doctors to search for a patient by their contact number.       Once everything is done, the doctor can logout of their account. Thus, in general, a doctor can login into his/her account, view their appointments and search for a patient. This is all about Doctor Module. -### Admin Module: - -       This module is the heart of our project where an admin can see the list of all patients. Doctors and appointments and the feedback/queries received from the ‘Contact’ page. Also admin can add doctor too. -       Login into admin account can be done by toggling into admin tab of the Home page. Fig 1.13 shows the login page for admin. -       `username`: admin, `password`: admin123 +### Admin Module + +> Sample user: admin password: admin123 + +       This module is the heart of our project where an admin can see the list of all patients. Doctors and appointments and the feedback/queries received from the ‘Contact’ page. Also admin can add doctor too. +      Login into admin account can be done by toggling into admin tab of the Home page. Fig 1.13 shows the login page for admin. +      `username`: admin, `password`: admin123 ![image](https://user-images.githubusercontent.com/36665975/66570795-e961e800-eb8b-11e9-94e2-79940ff1d45e.png) -On clicking the ‘Login’ button, the admin will be redirected to his/her dashboard as shown in +On clicking the ‘Login’ button, the admin will be redirected to his/her dashboard as shown in Fig 1.14. ![image](https://user-images.githubusercontent.com/36665975/66570841-03032f80-eb8c-11e9-9cfc-62b6b869c918.png) @@ -142,65 +111,129 @@ This module allows admin to perform five major operations: **1. View the list of all patients registered:** -       Admin can able to view all the patients registered. This includes the patients’ First Name, Last Name, Email ID, Contact Number and Password. (See Fig 1.15).As like in doctor module, admin can also search for a patient by their contact number in the search box. - - ![image](https://user-images.githubusercontent.com/36665975/66571179-83c22b80-eb8c-11e9-8819-008cdd2b0c2e.png) - +      Admin can able to view all the patients registered. This includes the patients’ First Name, Last Name, Email ID, Contact Number and Password. (See Fig 1.15).As like in doctor module, admin can also search for a patient by their contact number in the search box. + +![image](https://user-images.githubusercontent.com/36665975/66571179-83c22b80-eb8c-11e9-8819-008cdd2b0c2e.png) + **2. View the list of all doctors registered:** -       Details of the doctors can also be viewed by the admin. This details include the Name of the doctor, Password, Email and Consultancy fees, shown in Fig 1.16. Searching for a doctor can be done by using the doctor’s Email ID in the search box. +      Details of the doctors can also be viewed by the admin. This details include the Name of the doctor, Password, Email and Consultancy fees, shown in Fig 1.16. Searching for a doctor can be done by using the doctor’s Email ID in the search box. ![image](https://user-images.githubusercontent.com/36665975/66571329-a5bbae00-eb8c-11e9-89be-ce1a9c73e01b.png) **3. View the Appointment lists:** -       Admin can also able to see the entire details of the appointment that shows the appointment details of the patients with their respective doctors. This includes the First Name, Last Name, Email and Contact Number of patients, doctor’s name, Appointment Date, Time and the Consultancy Fees. (See Fig 1.17). - - ![image](https://user-images.githubusercontent.com/36665975/66571377-c3891300-eb8c-11e9-92d2-6755204564c7.png) - +      Admin can also able to see the entire details of the appointment that shows the appointment details of the patients with their respective doctors. This includes the First Name, Last Name, Email and Contact Number of patients, doctor’s name, Appointment Date, Time and the Consultancy Fees. (See Fig 1.17). + +![image](https://user-images.githubusercontent.com/36665975/66571377-c3891300-eb8c-11e9-92d2-6755204564c7.png) + **4. Add Doctor:** -       Admin alone can add a new doctor since anyone can register as a doctor if we put this section on the home page. This form asks Doctor’s Name, Email ID, Password and his/her Consultancy Fees.(See Fig 1.18) - - ![image](https://user-images.githubusercontent.com/36665975/66571687-55911b80-eb8d-11e9-9859-54e15d4ad8a0.png) - - After adding a new doctor, if we check the doctor’s list, we will see the details of new doctor is added to the list as shown in the Fig 1.19 - - ![image](https://user-images.githubusercontent.com/36665975/66571496-03e89100-eb8d-11e9-954e-7e3704bd0ca3.png) - +      Admin alone can add a new doctor since anyone can register as a doctor if we put this section on the home page. This form asks Doctor’s Name, Email ID, Password and his/her Consultancy Fees.(See Fig 1.18) + +![image](https://user-images.githubusercontent.com/36665975/66571687-55911b80-eb8d-11e9-9859-54e15d4ad8a0.png) + +After adding a new doctor, if we check the doctor’s list, we will see the details of new doctor is added to the list as shown in the Fig 1.19 + +![image](https://user-images.githubusercontent.com/36665975/66571496-03e89100-eb8d-11e9-954e-7e3704bd0ca3.png) + **5. View User’s feedback/Queries:** -       Admin is allowed to view the feedback/Query that has been given by the user in the ‘Contact’ page (Refer Fig 1.3). This includes User’s Name, Email Id, Contact Number and the message(Feedback/ Query) as shown in the Fig 1.20. - - ![image](https://user-images.githubusercontent.com/36665975/66571573-27134080-eb8d-11e9-8c1f-191a9f491872.png) - -       Taking everything into consideration, admin can able to view the details of patients and doctors, appointment details, Feedback by the user and can add a new doctor. Once everything is done, the admin can logout from his account. +      Admin is allowed to view the feedback/Query that has been given by the user in the ‘Contact’ page (Refer Fig 1.3). This includes User’s Name, Email Id, Contact Number and the message(Feedback/ Query) as shown in the Fig 1.20. + +![image](https://user-images.githubusercontent.com/36665975/66571573-27134080-eb8d-11e9-8c1f-191a9f491872.png) + +      Taking everything into consideration, admin can able to view the details of patients and doctors, appointment details, Feedback by the user and can add a new doctor. Once everything is done, the admin can logout from his account. ## Updates ### 1. Cancel Appointments - -       Patients and doctors can able to delete their appointments. - - ![image](https://user-images.githubusercontent.com/36665975/75169587-d0c72880-574e-11ea-9a9e-ba098c04e594.png) - - If the patient deletes the last record (for doctor Ganesh), then a label "deleted by you" will be displayed in the column 'Current Status' and the action will change to cancel state. - - ![image](https://user-images.githubusercontent.com/36665975/75169873-47642600-574f-11ea-8ca4-420b0dfd20c3.png) - - Now if we login to the doctor Ganesh's account and view his appointment details, then it will look like this: - - ![image](https://user-images.githubusercontent.com/36665975/75170076-9316cf80-574f-11ea-84ff-6a5976ce8179.png) - - Similarly doctors can also delete their appointments and patients can view their updated appointment details. - + +       Patients and doctors can able to delete their appointments. + + ![image](https://user-images.githubusercontent.com/36665975/75169587-d0c72880-574e-11ea-9a9e-ba098c04e594.png) + +If the patient deletes the last record (for doctor Ganesh), then a label "deleted by you" will be displayed in the column 'Current Status' and the action will change to cancel state. + +![image](https://user-images.githubusercontent.com/36665975/75169873-47642600-574f-11ea-8ca4-420b0dfd20c3.png) + +Now if we login to the doctor Ganesh's account and view his appointment details, then it will look like this: + +![image](https://user-images.githubusercontent.com/36665975/75170076-9316cf80-574f-11ea-84ff-6a5976ce8179.png) + +Similarly doctors can also delete their appointments and patients can view their updated appointment details. + ### 2. Remove Doctors by Admin       Admin can also delete the doctors from the system. This let admin to have more control over the system. ![image](https://user-images.githubusercontent.com/36665975/75170650-6d3dfa80-5750-11ea-8f05-455c7d704217.png) - +# Languages and Technologies used +1. HTML5/CSS3 +2. JavaScript (to create dynamically updating content) +3. Bootstrap (An HTML, CSS, and JS library) +4. XAMPP (A web server by Apache Friends) +5. Php +6. MySQL (An RDBMS that uses SQL) +7. TCPDF (to generate PDFs) + + +# Developer Windows + +

+ +## Prerequisites +1. Install XAMPP web server +2. Any Editor (Preferably VS Code or Sublime Text) +3. Any web browser with latest version + +## Steps to run the project in your machine +1. Download and install XAMPP in your machine +2. Clone or download the repository +3. Extract all the files and move it to the 'htdocs' folder of your XAMPP directory. +4. Start the Apache and Mysql in your XAMPP control panel. +5. Open your web browser and type 'localhost/phpmyadmin' +6. In phpmyadmin page, create a new database from the left panel and name it as 'myhmsdb' +7. Import the file 'myhmsdb.sql' inside your newly created database and click ok. +8. Open a new tab and type 'localhost/foldername' in the url of your browser +9. Hurray! That's it! + +# Developer Linux & Mac + +## Prerequisites + +- Docker + +## Build + +``` +docker build -t hms . +``` + +## Variables + +Just mysql parameters + +- DB_HOST +- DB_USER +- DB_PASSWORD +- DB_NAME + +## Run +``` +docker run -d -p 80:80 \ +-e "DB_SERVER=192.168.0.X" \ +-e "DB_USER=root" \ +-e "DB_PASS=changeme" \ +-e "DB_NAME=hospital" \ +--name hms hms +``` +## One click run +Just run this to create the database and start the application +``` +docker-compose up -d +``` diff --git a/admin-panel.php b/admin-panel.php index 9748733..1e4afdb 100755 --- a/admin-panel.php +++ b/admin-panel.php @@ -1,8 +1,21 @@ -alert('You are not allowed!');window.location.href = 'index.php';"); + } +} + +include('func.php'); include('newfunc.php'); -$con=mysqli_connect("localhost","root","","myhmsdb"); +$con=mysqli_connect(getenv('DB_SERVER'),getenv('DB_USER'),getenv('DB_PASS'),getenv('DB_NAME')); $pid = $_SESSION['pid']; @@ -36,14 +49,13 @@ $cur_time = date("H:i:s"); $apptime1 = strtotime($apptime); $appdate1 = strtotime($appdate); - + if(date("Y-m-d",$appdate1)>=$cur_date){ if((date("Y-m-d",$appdate1)==$cur_date and date("H:i:s",$apptime1)>$cur_time) or date("Y-m-d",$appdate1)>$cur_date) { $check_query = mysqli_query($con,"select apptime from appointmenttb where doctor='$doctor' and appdate='$appdate' and apptime='$apptime'"); if(mysqli_num_rows($check_query)==0){ $query=mysqli_query($con,"insert into appointmenttb(pid,fname,lname,gender,email,contact,doctor,docFees,appdate,apptime,userStatus,doctorStatus) values($pid,'$fname','$lname','$gender','$email','$contact','$doctor','$docFees','$appdate','$apptime','1','1')"); - if($query) { echo ""; @@ -63,7 +75,7 @@ else{ echo ""; } - + } if(isset($_GET['cancel'])) @@ -80,7 +92,7 @@ function generate_bill(){ - $con=mysqli_connect("localhost","root","","myhmsdb"); + $con=mysqli_connect(getenv('DB_SERVER'),getenv('DB_USER'),getenv('DB_PASS'),getenv('DB_NAME')); $pid = $_SESSION['pid']; $output=''; $query=mysqli_query($con,"select p.pid,p.ID,p.fname,p.lname,p.doctor,p.appdate,p.apptime,p.disease,p.allergy,p.prescription,a.docFees from prestb p inner join appointmenttb a on p.ID=a.ID and p.pid = '$pid' and p.ID = '".$_GET['ID']."'"); @@ -96,11 +108,11 @@ function generate_bill(){ '.$row["allergy"].'

'.$row["prescription"].'

'.$row["docFees"].'
- + '; } - + return $output; } @@ -128,10 +140,10 @@ function generate_bill(){

Global Hospitals


Bill

- + '; - + $content .= generate_bill(); $obj_pdf -> writeHTML($content); ob_end_clean(); @@ -140,7 +152,7 @@ function generate_bill(){ } function get_specs(){ - $con=mysqli_connect("localhost","root","","myhmsdb"); + $con=mysqli_connect(getenv('DB_SERVER'),getenv('DB_USER'),getenv('DB_PASS'),getenv('DB_NAME')); $query=mysqli_query($con,"select username,spec from doctb"); $docarray = array(); while($row =mysqli_fetch_assoc($query)) @@ -162,20 +174,20 @@ function get_specs(){ - + - - - - + + + + - +