-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathforgot.php
68 lines (57 loc) · 2.26 KB
/
forgot.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
<?php
session_start();
require_once('database/dbhelper.php');
$error = '';
$success = '';
if (isset($_SESSION['errors'])) {
$error = $_SESSION['errors'];
}
if (isset($_SESSION['success'])) {
$success = $_SESSION['success'];
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Forgot Password</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
<div class="row justify-content-center">
<div class="col-md-6 col-lg-5">
<h3 class="text-center text-secondary mt-5 mb-3">Forgot Password</h3>
<form method="post" action="sendMail.php" class="border rounded w-100 mb-5 mx-auto px-3 pt-3 bg-light">
<div class="form-group">
<label for="email">Email</label>
<input value="" name="email" id="email" type="email" class="form-control" placeholder="Email">
</div>
<div class="form-group">
<?php
if (!empty($error)) {
echo "<div class='alert alert-danger'>$error</div>";
}
?>
<?php
if (!empty($success)) {
echo "<div class='alert alert-success'>$success</div>";
}
?>
<button class="btn btn-success px-5">Send mail</button>
</div>
<div class="form-group">
<p>Don't have an account yet? <a href="register.php">Register now</a>.</p>
<p>Do you already have an account ? <a href="login.php">Login</a>.</p>
</div>
</form>
</div>
</div>
</div>
<?php unset($_SESSION['errors']); ?>
</body>
</html>