-
Notifications
You must be signed in to change notification settings - Fork 0
/
recover.php
46 lines (41 loc) · 1.03 KB
/
recover.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
<?php
include 'main_functions/init.php';
logged_in_redirect();
include 'includes/overall/header.php';
?>
<h1>Recover</h1>
<?php
if (isset($_GET['success']) === true && empty($_GET['success']) === true) {
?>
<section>
<p>We have emailed you</p>
</section>
<?php
} else {
if (isset($_POST['email']) === true && empty($_POST['email']) === false) {
if (email_exists($_POST['email']) === true) {
recover($_POST['email']);
header('Location: recover.php?success');
exit();
} else {
echo '<p>There is no account with this email address!</p>';
}
}
?>
<section>
<form action="" method="post">
<ul>
<li>
Please enter your email address:<br>
<input type="email" name="email">
</li>
<li>
<input type="submit" value="Recover">
</li>
</ul>
</form>
</section>
<?php
}
include 'includes/overall/footer.php';
?>