Step 1 Creation of Login & Signup page Module

Login Page


Signup page


Homepage

Functionalities of this page:

  • You Can show some important details on the landing page.
  • Existing Users will be able to login through user login page.
  • Admins can also login using admin login form.
  • Users will be able to signup using above signup button.
  • These will be our main functionalities of login page.

Code:

Below is the Code for creating above page:

index.html
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="css/animations.css">  
    <link rel="stylesheet" href="css/main.css">  
    <link rel="stylesheet" href="css/index.css">
    <title>eDoc</title>
    <style>
        table{
            animation: transitionIn-Y-bottom 0.5s;
        }
    </style>
        
</head>
<body>
    
    <div class="full-height">
        <center>
        <table border="0">
            <tr>
                <td width="80%">
                    <font class="edoc-logo">HMS </font>
                    <font class="edoc-logo-sub">| Hospital Management System</font>
                </td>
                <td  width="10%">
                    <a href="signup.php" class="non-style-link"><p class="nav-item" style="padding-right: 10px;">REGISTER</p></a>
                </td>
            </tr>
            
            <tr>
                <td  colspan="3">
                    <p class="heading-text">Ease process, save time.</p>

                </td>
            </tr>
            <tr>
                <td  colspan="3">
                    <p class="sub-text2">Feeling under the weather today? No need to fret. With HMS, <br>
                        you can easily connect with healthcare professionals and schedule appointments online.
                </td>
            </tr>
            <tr>
                
                <td colspan="3">
                    <center>
                    <a href="login.php" >
                        <input type="button" value="Make Appointment" class="login-btn btn-primary btn" style="padding-left: 25px;padding-right: 25px;padding-top: 10px;padding-bottom: 10px;">
                    </a>
                </center>
                </td>
                
            </tr>
            <tr>
                <td colspan="3">
                   
                </td>
            </tr>
        </table>
    </center>
    
    </div>
</body>
</html>
connection.php
<?php

    $database= new mysqli("localhost","root","","edoc");
    if ($database->connect_error){
        die("Connection failed:  ".$database->connect_error);
    }

?>
logout.php
<?php 

    session_start();

    $_SESSION = array();

    if (isset($_COOKIE[session_name()])) {
        setcookie(session_name(), '', time()-86400, '/');
    }

    session_destroy();


    header('Location: login.php?action=logout');

 ?>
create-account.php
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="css/animations.css">  
    <link rel="stylesheet" href="css/main.css">  
    <link rel="stylesheet" href="css/signup.css">
        
    <title>Create Account</title>
    <style>
        .container{
            animation: transitionIn-X 0.5s;
        }
    </style>
</head>
<body>
<?php



session_start();

$_SESSION["user"]="";
$_SESSION["usertype"]="";


date_default_timezone_set('Asia/Kolkata');
$date = date('Y-m-d');
$_SESSION["date"]=$date;

include("connection.php");

if($_POST){

    $result= $database->query("select * from webuser");
    $fname=$_SESSION['personal']['fname'];
    $lname=$_SESSION['personal']['lname'];
    $name=$fname." ".$lname;
    $address=$_SESSION['personal']['address'];
    $nic=$_SESSION['personal']['nic'];
    $dob=$_SESSION['personal']['dob'];
    $email=$_POST['newemail'];
    $tele=$_POST['tele'];
    $newpassword=$_POST['newpassword'];
    $cpassword=$_POST['cpassword'];
    
    if ($newpassword==$cpassword){
        $sqlmain= "select * from webuser where email=?;";
        $stmt = $database->prepare($sqlmain);
        $stmt->bind_param("s",$email);
        $stmt->execute();
        $result = $stmt->get_result();
        if($result->num_rows==1){
            $error='<label for="promter" class="form-label" style="color:rgb(255, 62, 62);text-align:center;">Already have an account for this Email address.</label>';
        }else{
           
            $database->query("insert into patient(pemail,pname,ppassword, paddress, pnic,pdob,ptel) values('$email','$name','$newpassword','$address','$nic','$dob','$tele');");
            $database->query("insert into webuser values('$email','p')");

          
            $_SESSION["user"]=$email;
            $_SESSION["usertype"]="p";
            $_SESSION["username"]=$fname;

            header('Location: patient/index.php');
            $error='<label for="promter" class="form-label" style="color:rgb(255, 62, 62);text-align:center;"></label>';
        }
        
    }else{
        $error='<label for="promter" class="form-label" style="color:rgb(255, 62, 62);text-align:center;">Password Conformation Error! Reconform Password</label>';
    }
}else{
    
    $error='<label for="promter" class="form-label"></label>';
}
?>
    <center>
    <div class="container">
        <table border="0" style="width: 69%;">
            <tr>
                <td colspan="2">
                    <p class="header-text">Let's Get Started</p>
                    <p class="sub-text">It's Okey, Now Create User Account.</p>
                </td>
            </tr>
            <tr>
                <form action="" method="POST" >
                <td class="label-td" colspan="2">
                    <label for="newemail" class="form-label">Email: </label>
                </td>
            </tr>
            <tr>
                <td class="label-td" colspan="2">
                    <input type="email" name="newemail" class="input-text" placeholder="Email Address" required>
                </td>
                
            </tr>
            <tr>
                <td class="label-td" colspan="2">
                    <label for="tele" class="form-label">Mobile Number: </label>
                </td>
            </tr>
            <tr>
                <td class="label-td" colspan="2">
                    <input type="tel" name="tele" class="input-text"  placeholder="ex: 0712345678" pattern="[0]{1}[0-9]{9}" >
                </td>
            </tr>
            <tr>
                <td class="label-td" colspan="2">
                    <label for="newpassword" class="form-label">Create New Password: </label>
                </td>
            </tr>
            <tr>
                <td class="label-td" colspan="2">
                    <input type="password" name="newpassword" class="input-text" placeholder="New Password" required>
                </td>
            </tr>
            <tr>
                <td class="label-td" colspan="2">
                    <label for="cpassword" class="form-label">Conform Password: </label>
                </td>
            </tr>
            <tr>
                <td class="label-td" colspan="2">
                    <input type="password" name="cpassword" class="input-text" placeholder="Conform Password" required>
                </td>
            </tr>
     
            <tr>
                
                <td colspan="2">
                    <?php echo $error ?>

                </td>
            </tr>
            
            <tr>
                <td>
                    <input type="reset" value="Reset" class="login-btn btn-primary-soft btn" >
                </td>
                <td>
                    <input type="submit" value="Sign Up" class="login-btn btn-primary btn">
                </td>

            </tr>
            <tr>
                <td colspan="2">
                    <br>
                    <label for="" class="sub-text" style="font-weight: 280;">Already have an account&#63; </label>
                    <a href="login.php" class="hover-link1 non-style-link">Login</a>
                    <br><br><br>
                </td>
            </tr>

                    </form>
            </tr>
        </table>

    </div>
</center>
</body>
</html>
login.php
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="css/animations.css">  
    <link rel="stylesheet" href="css/main.css">  
    <link rel="stylesheet" href="css/login.css">
        
    <title>Login</title>

    
    
</head>
<body>
    <?php


    session_start();

    $_SESSION["user"]="";
    $_SESSION["usertype"]="";
    
    date_default_timezone_set('Asia/Kolkata');
    $date = date('Y-m-d');

    $_SESSION["date"]=$date;
    

    include("connection.php");

    



    if($_POST){

        $email=$_POST['useremail'];
        $password=$_POST['userpassword'];
        
        $error='<label for="promter" class="form-label"></label>';

        $result= $database->query("select * from webuser where email='$email'");
        if($result->num_rows==1){
            $utype=$result->fetch_assoc()['usertype'];
            if ($utype=='p'){
         
                $checker = $database->query("select * from patient where pemail='$email' and ppassword='$password'");
                if ($checker->num_rows==1){


              
                    $_SESSION['user']=$email;
                    $_SESSION['usertype']='p';
                    
                    header('location: patient/index.php');

                }else{
                    $error='<label for="promter" class="form-label" style="color:rgb(255, 62, 62);text-align:center;">Wrong credentials: Invalid email or password</label>';
                }

            }elseif($utype=='a'){
                //TODO
                $checker = $database->query("select * from admin where aemail='$email' and apassword='$password'");
                if ($checker->num_rows==1){


                    $_SESSION['user']=$email;
                    $_SESSION['usertype']='a';
                    
                    header('location: admin/index.php');

                }else{
                    $error='<label for="promter" class="form-label" style="color:rgb(255, 62, 62);text-align:center;">Wrong credentials: Invalid email or password</label>';
                }


            }elseif($utype=='d'){
                //TODO
                $checker = $database->query("select * from doctor where docemail='$email' and docpassword='$password'");
                if ($checker->num_rows==1){

                    $_SESSION['user']=$email;
                    $_SESSION['usertype']='d';
                    header('location: doctor/index.php');

                }else{
                    $error='<label for="promter" class="form-label" style="color:rgb(255, 62, 62);text-align:center;">Wrong credentials: Invalid email or password</label>';
                }

            }
            
        }else{
            $error='<label for="promter" class="form-label" style="color:rgb(255, 62, 62);text-align:center;">We cant found any acount for this email.</label>';
        }


        
    }else{
        $error='<label for="promter" class="form-label">&nbsp;</label>';
    }

    ?>





    <center>
    <div class="container">
        <table border="0" style="margin: 0;padding: 0;width: 60%;">
            <tr>
                <td>
                    <p class="header-text">Welcome Back!</p>
                </td>
            </tr>
        <div class="form-body">
            <tr>
                <td>
                    <p class="sub-text">Login with your details to continue</p>
                </td>
            </tr>
            <tr>
                <form action="" method="POST" >
                <td class="label-td">
                    <label for="useremail" class="form-label">Email: </label>
                </td>
            </tr>
            <tr>
                <td class="label-td">
                    <input type="email" name="useremail" class="input-text" placeholder="Email Address" required>
                </td>
            </tr>
            <tr>
                <td class="label-td">
                    <label for="userpassword" class="form-label">Password: </label>
                </td>
            </tr>

            <tr>
                <td class="label-td">
                    <input type="Password" name="userpassword" class="input-text" placeholder="Password" required>
                </td>
            </tr>


            <tr>
                <td><br>
                <?php echo $error ?>
                </td>
            </tr>

            <tr>
                <td>
                    <input type="submit" value="Login" class="login-btn btn-primary btn">
                </td>
            </tr>
        </div>
            <tr>
                <td>
                    <br>
                    <label for="" class="sub-text" style="font-weight: 280;">Don't have an account&#63; </label>
                    <a href="signup.php" class="hover-link1 non-style-link">Sign Up</a>
                    <br><br><br>
                </td>
            </tr>
                        
                        
    
                        
                    </form>
        </table>

    </div>
</center>
</body>
</html>
signup.php
<?php
    // code
?>


Hospital Management System Project in Software Development

Hospital Management System (HMS) is one of the most common software development projects. In this article, we will make the Hospital Management System software development project, from scratch, for final-year students. We will cover all the steps you must do while developing this project.

Table of Content

  • Step 1- Team Formation Phase: Creating a Dynamic Team
  • Step 2- Topic Selection
  • Step 3- Project Synopsys for Hospital Management System
  • Step 4- Requirement Gathering (Creating SRS for Hospital Management System)
  • Software Requirement Specification (SRS) Document | Hospital Management System
  • 4.1 SRS (Hospital Management System) | Introduction:
  • 4.2 SRS (Hospital Management System) | Overall Description:
  • 4.2.3 Class Diagram of Library Management System:
  • 4.3 SRS (Hospital Management System) | Designing Hospital Management System:
  • 4.3.1 Use case Diagram for Hospital Management System:
  • 4.3.2 ER Model of Hospital Management System:
  • 4.3.3 Data Flow Diagram of Hospital Management System
  • 4.3.4 Sequence Diagram of Hospital Management System
  • 4.3.5 Activity Diagram of Hospital Management System
  • 4.4 Functional Requirements | SRS (Hospital Management System)
  • 4.5 Non Functional Requirements | SRS (Hospital Management System)
  • 5. Coding or Implementation of Hospital Mangement System
  • 5.1 Implementing Hospital Management System | Environment Creation:
  • 5.2 Implementing Hospital Mangement System | Database Creation:
  • 5.3 Implementing Hospital Mangement System | Frontend and Backend Development:
  • 5.3.1 Step 1: Creation of Login & Signup page Module:
  • 5.3.2 Step 2: Creating Patient Module:
  • 5.3.3 Step 3: Creating Doctors Module:
  • 5.3.4 Step 4: Creating Admin module
  • Step 6- Testing Hospital Management System
  • Step 7- Creating Project Presentation on Hospital Management System:
  • Check Out Some Other CS Relate Projects down below:

Project Development is a multiphase process in which every process is equally important. Here in this post, we are also going to develop our Hospital Management System Project in multiple phases, such as:

  1. Team Formation
  2. Topic Selection
  3. Creating Project Synopsys
  4. Requirement Gathering
  5. Coding or Implementation
  6. Testing
  7. Project Presentation

Let us look into the steps one by one.

Similar Reads

Step 1- Team Formation Phase: Creating a Dynamic Team

Team formation for a final-year project is a crucial aspect that can significantly impact the success and efficiency of the project. In the final year, students often have diverse academic backgrounds, skills, and interests. Therefore, forming a well-balanced team becomes essential to leverage the strengths of each member and address any potential weaknesses....

Step 2- Topic Selection

While making our project of Hospital Management System this will be our second step in which we will find an interesting problem statement and try to generate an idea to solve that problem using our knowledge....

Step 3- Project Synopsys for Hospital Management System

A project synopsis serves as a concise overview or summary of a proposed project, offering a brief but comprehensive insight into its objectives, scope, methodology, and expected outcomes. It typically acts as a preliminary document, providing supervisors, or evaluators with a quick understanding of the project before they delve into more detailed documentation....

Step 4- Requirement Gathering (Creating SRS for Hospital Management System)

This is the next phase after the submission of the synopsis report. We can do this process before the Synopsys report creation as well , It is all depends upon the project and their requirements. Here after getting an overview about the project now we can easily do the requirement gathering for our project....

Software Requirement Specification (SRS) Document | Hospital Management System

Below are some of the key points in a Software Requirement Specification Document:...

4.1 SRS (Hospital Management System) | Introduction:

4.1.1 Purpose:...

4.2 SRS (Hospital Management System) | Overall Description:

4.2.1 Product Perspective:...

4.2.3 Class Diagram of Library Management System:

Class Diagram for Hospital Management System simply describes structure of Hospital Management System class, attributes, methods or operations, relationship among objects....

4.3 SRS (Hospital Management System) | Designing Hospital Management System:

4.3.1 Use case Diagram for Hospital Management System:...

4.3.1 Use case Diagram for Hospital Management System:

A Use Case Diagram for a Hospital Management System (HMS) depicts the interactions between actors (users or external systems) and the system to achieve specific goals. Here’s a simplified version of a Use Case Diagram for an HMS:...

4.3.2 ER Model of Hospital Management System:

ER Diagram is known as Entity-Relationship Diagram, it is used to analyze  the structure of the Database. It shows relationships between entities and their attributes. An ER Model provides a means of communication....

4.3.3 Data Flow Diagram of Hospital Management System

A Data Flow Diagram (DFD) for a Hospital Management System (HMS) illustrates the flow of data within the system and between external entities. Here’s a simplified DFD for an HMS:...

4.3.4 Sequence Diagram of Hospital Management System

Creating a sequence diagram for a Hospital Management System involves depicting the interactions between various components or actors within the system. Here’s a simplified version:...

4.3.5 Activity Diagram of Hospital Management System

This activity diagram outlines the main activities and interactions within the Hospital Management System, including booking appointments, patient check-in, accessing medical records, billing, inventory management, staff management, and report generation. Each activity represents a specific task or function performed by users or the system....

4.4 Functional Requirements | SRS (Hospital Management System)

Functional requirements for a Hospital Management System (HMS) typically include a wide range of features and capabilities to ensure efficient operations and effective patient care. Here are some common functional requirements for an HMS:...

4.5 Non Functional Requirements | SRS (Hospital Management System)

4.5.1 Usability Requirements:...

5. Coding or Implementation of Hospital Mangement System

At this stage, the fundamental development of the product starts. For this, developers use a specific programming code as per the design. Hence, it is important for the coders to follow the protocols set by the association. Conventional programming tools like compilers, interpreters, debuggers, etc. are also put into use at this stage....

5.1 Implementing Hospital Management System | Environment Creation:

Required Softwares:...

5.2 Implementing Hospital Mangement System | Database Creation:

Go to your favourite browser and write localhost/dashboard >> phpmyadmin...

5.3 Implementing Hospital Mangement System | Frontend and Backend Development:

This is how our landing page looks like:...

5.3.1 Step 1: Creation of Login & Signup page Module:

Login Page...

5.3.2 Step 2: Creating Patient Module:

In this module we will have following features....

5.3.3 Step 3: Creating Doctors Module:

Here are some features in the doctors module:...

5.3.4 Step 4: Creating Admin module

Here are some features of admin module:...

Step 6- Testing Hospital Management System

Testing is a crucial phase in the development of a Hospital management system (HMS) to ensure that it meets its intended requirements, functions correctly, and is free of bugs. Below are some key steps and considerations for the testing phase of a hospital management system:...

Step 7- Creating Project Presentation on Hospital Management System:

In this phase of software development, Team will have to present their work in front of authorities and they will judge your work and give suggestions on the improvement areas....

Check Out Some Other CS Relate Projects down below:

Portfolio Website ProjectWeather Forecast Project URL Shortener Project...

Contact Us