-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnewpassword.php
More file actions
34 lines (33 loc) · 1.1 KB
/
newpassword.php
File metadata and controls
34 lines (33 loc) · 1.1 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
<?php
error_reporting(0);
session_start();
require_once('header.php');
require_once('config.php');
$password = $password2 = '';
$hash=$_GET['hash'];
$email=$_GET['email'];
$_SESSION['hash'] = $hash;
$_SESSION['email'] = $email;
$sql = "SELECT * FROM users WHERE hash='$hash' AND email='$email'";
$result = mysqli_query($db, $sql);
if(mysqli_num_rows($result) <= 0)
{
Header("Location:index.php");
}
?>
<form class="form-horizontal" method="POST" action="changepassword.php">
<div class="mb-3">
<div align="center">
<img src="digitus.png" width="151" height="50"><br><br> </div>
<label for="exampleInputEmail1" class="form-label">New Password</label>
<input type="password" class="form-control" name="password" id="password">
<div id="emailHelp" class="form-text">Feel free.</div>
</div>
<div class="mb-3">
<label for="exampleInputPassword1" class="form-label">Re-New Password</label>
<input type="password" class="form-control" name="password2" id="password">
</div>
<div class="mb-3 form-check">
</div>
<button type="submit" class="btn btn-success">Set New Password</button>
</form>