-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathForgotPassword.php
More file actions
35 lines (29 loc) · 959 Bytes
/
ForgotPassword.php
File metadata and controls
35 lines (29 loc) · 959 Bytes
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
<?php
require_once 'Include/Load.php';
$session = App::getSession();
$link = App::getDatabase();
$user = App::getUser();
$validator = App::getValidator();
if ($validator->isPosted() && $validator->isValuePosted('email')){
if ($user->verifyEmail($_POST['email'])){
$session->setFlash('success', 'The mail containing the Instructions for the Password Reset has been sent to you');
App::redirect('Login.php');
} else{
$session->setflash('alert', 'Connection Information are invalid');
}
}
?>
<?php require_once 'Include/Header.php' ?>
<div class="login-box">
<h2>Forgotten Password</h2>
<form action="<?php echo $_SERVER['PHP_SELF'] ?>" method="post">
<div class="user-box">
<input type="email" name="email" required="">
<label>Email</label>
</div>
<button type="submit">Submit</button>
</form>
</div>
<?php require_once 'Include/Mode.php'; ?>
</body>
</html>