-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathresetPassword.php
79 lines (59 loc) · 2.23 KB
/
resetPassword.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<?php
require 'controllers/user.php';
$user = new User;
if (isset($_GET["code"])) {
if (isset($_POST['reset_password'])) {
$code = $_GET["code"];
$newPassword = $_POST['new_password'];
$message = $user->createNewPassword($newPassword, $code);
$_SESSION['mail-mgs'] = "Password Updated!";
echo '<script> location.replace("login.php"); </script>';
exit();
}
}else{
exit("Can't find page");
}
?>
<!DOCTYPE html>
<div lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link href="https://fonts.googleapis.com/css?family=Poppins&display=swap" rel="stylesheet">
<link rel="stylesheet" href="css/bootstrap.css">
<link rel="stylesheet" href="css/newdashboard.css">
<link rel="stylesheet" href="css/form.css">
<!-- <link rel="stylesheet" href="css/main.css"> -->
<title>Document</title>
</head>
<body>
<!-- <div class="logo">
<img src="./images/Logo.png" alt="logo">
</div> -->
<div class="alert alert-sucess">
<img src="images/Image from iOS.png" alt="" srcset="" widht="100" height="70">
</div>
<h4 class="little-title text-center text-info">ASCLEPIUS CLASSROOM MEMBERSHIP AREA</h4>
<div class="register_login-content" id="login-form">
<form method="POST" id="myform" onsubmit="return CreateNewPassword();">
<h2 class="form-title">Create New Password</h2>
<div id="errorCreateNewPassword">
</div>
<div>
<label for="">Password</label>
<input type="password" name="new_password" id="new_password" class="text-input">
</div>
<div>
<label for="">Confirm Password</label>
<input type="password" name="confirm_password" id="confirm_new_password" class="text-input">
</div>
<div>
<button type="submit" class="btn btn-big" name="reset_password">Create New Password</button>
</div>
<p>Return back to <a href="login.php" class="text-danger">Login</a></p>
</form>
</div>
<script src="js/main.js"></script>
</body>
</div>