-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathforgot-password.php
56 lines (50 loc) · 1.43 KB
/
forgot-password.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
<?php
session_start();
error_reporting(0);
include('includes/dbconnection.php');
if(isset($_POST['submit']))
{
$contactno=$_POST['contactno'];
$email=$_POST['email'];
$query=mysqli_query($con,"select ID from tbluser where Email='$email' and MobileNumber='$contactno' ");
$ret=mysqli_fetch_array($query);
if($ret>0){
$_SESSION['contactno']=$contactno;
$_SESSION['email']=$email;
header('location:reset-password.php');
}
else{
$msg="Invalid Details. Please try again.";
}
}
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Reset</title>
<link rel="stylesheet" href="css/style.css">
<link href="css/font-awesome.min.css" rel="stylesheet">
</head>
<body>
<div class="login">
<h1>RESET PASSWORD</h1>
<p style="font-size:16px; color:red" align="center"> <?php if($msg){
echo $msg;
} ?> </p>
<form role="form" action="" method="post" id="" name="login">
<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="number" name="password" placeholder="Phone Number" required>
<input type="submit" value="Reset" name="login">
</form>
</div>
<script src="js/jquery-1.11.1.min.js"></script>
<script src="js/bootstrap.min.js"></script>
</body>
</html>