-
Notifications
You must be signed in to change notification settings - Fork 0
/
resetpass.php
57 lines (52 loc) · 1.58 KB
/
resetpass.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 require("head.php"); ?>
<?php require("connection.php"); ?>
<?php
if(isset($_POST["confirm"]))
{
$email=$_POST["email"];
$sql="select password from customer where email='$email'";
$result=mysqli_query($conn,$sql);
$mrow=mysqli_fetch_array($result);
$pass=$mrow[0];
$subject="Forgot password";
$message="<h1> Trying to log in </h1><br>
you have requested for your password <br>
your password is : $pass
If you did not request for this,<br>
please ignore the message
" ;
sendamail($email,$subject,$message);
?>
<script>
window.alert("Your password has been mailed to you");
</script>
<?php
}
?>
<div class="flex flex-center ">
<form class="card form " method="POST" action="">
<table>
<tbody>
<tr >
<th >Reset Your Password </th>
</tr>
<tr>
<td>Enter Your Email</td>
<td><input type="email" name="email" id="email"></td>
</tr>
<tr>
<td>confirm</td>
<td>
<input type="submit" name="confirm" id="confirm" value="confirm">
</td>
</tr>
<tr>
<td class="errortext">We will mail you your password</td>
</tr>
<tr>
<td class="errortext">If you have lost your mail id contact our team directly</td>
</tr>
</tbody>
</table>
</form>
</div>