-
Notifications
You must be signed in to change notification settings - Fork 6
/
index.php
57 lines (53 loc) · 1.45 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<?php
session_start();
error_reporting(0);
include('includes/dbconnection.php');
if(isset($_POST['login']))
{
global $hosId;
$email=$_POST['email'];
$password=md5($_POST['password']);
$query=mysqli_query($con,"SELECT ID FROM tbluser WHERE Email='$email' && Password='$password' ");
$ret=mysqli_fetch_array($query);
$hosId=$ret['hospital_id'];
// echo $hosId;
// echo count($ret);
if($ret>0){
$_SESSION['sessionid']=$ret['ID'];
header('location:dashboard.php');
}
else{
$msg="Invalid Details.";
}
}
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Login</title>
<link rel="stylesheet" href="css/style.css">
<link href="css/font-awesome.min.css" rel="stylesheet">
</head>
<body>
<div class="login">
<h1>INFOSERVE LOGIN</h1>
<p style="font-size:16px; color:red" align="center"> <?php if($msg){
echo $msg;
} ?> </p>
<form action=" " method="post">
<label for="username">
<i class="fa fa-envelope"></i>
</label>
<input type="email" name="email" placeholder="Email" id="email" required>
<label for="password">
<i class="fa fa-lock"></i>
</label>
<input type="password" name="password" placeholder="Password" id="password" required>
<a href="forgot-password.php">Forgot Password?</a>
<input type="submit" value="login" name="login">
<!-- <button type="submit" class="input button" value="login" name="login">login</button/> -->
</form>
</div>
</body>
</html>