Step 1 Creation of Login & Signup page Module
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:
<!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>
<?php
$database= new mysqli("localhost","root","","edoc");
if ($database->connect_error){
die("Connection failed: ".$database->connect_error);
}
?>
<?php
session_start();
$_SESSION = array();
if (isset($_COOKIE[session_name()])) {
setcookie(session_name(), '', time()-86400, '/');
}
session_destroy();
header('Location: login.php?action=logout');
?>
<!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="https://www.w3wiki.netcss/animations.css">
<link rel="stylesheet" href="https://www.w3wiki.netcss/main.css">
<link rel="stylesheet" href="https://www.w3wiki.netcss/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? </label>
<a href="https://www.w3wiki.netlogin.php" class="hover-link1 non-style-link">Login</a>
<br><br><br>
</td>
</tr>
</form>
</tr>
</table>
</div>
</center>
</body>
</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="https://www.w3wiki.netcss/animations.css">
<link rel="stylesheet" href="https://www.w3wiki.netcss/main.css">
<link rel="stylesheet" href="https://www.w3wiki.netcss/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"> </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? </label>
<a href="https://www.w3wiki.netsignup.php" class="hover-link1 non-style-link">Sign Up</a>
<br><br><br>
</td>
</tr>
</form>
</table>
</div>
</center>
</body>
</html>
<?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:
- Team Formation
- Topic Selection
- Creating Project Synopsys
- Requirement Gathering
- Coding or Implementation
- Testing
- Project Presentation
Let us look into the steps one by one.