forked from Justinjolly/DBMS_Project
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathforgot_password.php
More file actions
92 lines (74 loc) · 2.09 KB
/
forgot_password.php
File metadata and controls
92 lines (74 loc) · 2.09 KB
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
82
83
84
85
86
87
88
89
90
91
92
<?php
$connection=new mysqli("localhost","root","","project");
if($_POST)
{
$email=$_POST['email'];
$selectquery=mysqli_query($connection,"select * from admin where email='{$email}'") or die(mysqli_error($connection));
$count=mysqli_num_rows($selectquery);
$row=mysqli_fetch_array($selectquery);
$password=isset($row['password']) ;
if($count>0){
$message=("your password is ".$row['password']);
echo "<script type='text/javascript'>alert('$message');</script>";
}
else{
echo '<script type ="text/JavaScript">';
echo 'alert("Invalid email")';
echo '</script>';
}
echo "<script> location.href='index.html'; </script>";
}
?>
<html>
<style>
.button{
background-color: #9c2715;
color: white;
}
.form{
background-color: #dcdcdc;
width: 400px;
padding-bottom: 50px;
padding-top: 50px;
border: 2px solid black;
}
.main{
margin: 120px 0px;
}
.form_design{
padding-top: 20px;
}
.title{
/* #9c2715 */
background-color:#d63447;
color: white;
text-align: center;
font-weight: bold;
width: 400px;
padding-top: 10px;
padding-bottom: 10px;
font-size: 20px;
border: 2px solid black;
border-bottom: none;
}
.background{
background-size: 100% 100%;
background-repeat: no-repeat;
background-attachment: fixed;
}
</style>
<body background="images/SJCET_PALAI_College_Front_View.jpg" class="background">
<center class="main">
<div class="form_design">
<center class="title">Recover Password</center>
<form method="post" class="form">
<br>
Email: <input type="email" name="email">
<br>
<br>
<input type="submit" class="button">
</form>
</div>
</center>
</body>
</html>