-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpatient_success_msg.php
81 lines (42 loc) · 1.95 KB
/
patient_success_msg.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<?php include('header.php'); ?>
<!-- this is for donor registraton -->
<div class="login" style="background-color:#fff;">
<h1 class="text-center" style="background-color:#272327;color: #fff;">Congratulations....!!!</h1>
<p class="text-center">You have been registered!</p>
<div class="formstyle" style="float: right;padding:20px;border: 1px solid lightgrey;margin-right:415px; margin-bottom:30px;background-color:#f3f3f8;color:#141313;">
<form action="" method="post" class="text-center">
<label>
Email: <input type="email" name="email" placeholder="username" required>
</label><br><br>
<label>
Password: <input type="password" name="password" placeholder="password" required>
</label><br><br>
<button name="submit" type="submit" style="margin-left:36px;width: 85px;border-radius: 3px;">Login</button> <br>
<!-- Not a member?<a href="donor_seeker_regi.php" title="create a account" target="" style="color:black;"> Sign Up</a> <br> -->
<!-- login validation -->
<?php
include('config.php');
if(isset($_POST["submit"])){
$sql= "SELECT * FROM patient WHERE email= '" . $_POST["email"]."' AND password= '" . $_POST["password"]."'";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
// $_SESSION["email"]= $_POST["email"];
// $_SESSION['userstatus']= "yes";
echo "<script>location.replace('patient/dashboard.php');</script>";
// echo "u are supposed to redirect to ur profile";
} else {
echo "<span style='color:red;'>Please, check username and password</span>";
}
$conn->close();
}
?>
<!-- login validation End-->
</form> <br>
<br>
</div>
</div>
<?php include('footer.php'); ?>
</div><!-- containerFluid Ends -->
<script src="js/bootstrap.min.js"></script>
</body>
</html>