-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcreate-new-password.php
52 lines (45 loc) · 1.58 KB
/
create-new-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
<?php
require 'header.php';
?>
<head>
<style>
main{background-color: #ccc;height: 700px;}
.form-content{width: 40%;margin: auto;font-size: 20px;
background-color: white;padding: 20px;padding-top: 10px;}
h3{text-align: center;}
#signup{margin-left: 40px;}
#signup input[type=text],#signup input[type=password],#signup input[type=email]{margin: 10px 0px;width: 60%;}
#action{padding-top: 15px;margin-left: 50%;}
h5{color: red;text-align: center;}
#success{color: green;}
</style>
</head>
<main>
<br><br>
<div class="form-content">
<h3>Reset Your Password</h3>
<?php
$selector = $_GET['selector'];
$validator = $_GET['validator'];
if (empty($selector) || empty($validator)) {
echo '<h5>Could not validate your request</h5>';
}
else {
if ((ctype_xdigit($selector) !== false) && (ctype_xdigit($validator) !== false)) {
echo '<form id="signup" action="includes/reset-password.inc.php" method="post">
<input type="hidden" name="selector" value="'. $selector.'">
<input type="hidden" name="validator" value="'. $validator.'">
<label>New Password :</label><br>
<input type="password" name="pwd" placeholder="Enter Your New Password" required><br>
<label>Repeat New Password :</label><br>
<input type="password" name="pwd-repeat" placeholder="Repeat Your New Password" required><br>
<button type="submit" name="reset-password-submit">Change Password</button>
</form>';
}
}
?>
</div>
</main>
<?php
require 'footer.php';
?>