-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathforgot_pass.php
More file actions
68 lines (59 loc) · 2.36 KB
/
forgot_pass.php
File metadata and controls
68 lines (59 loc) · 2.36 KB
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
<?php
require_once 'includes/header.php';
require_once 'includes/admin_nav.php';
LogInCheck();
if(!($_SESSION['role']=='admin'))
{
header('location: admin_home.php');
}
?>
<nav class="nav">
<div class="container-fluid">
<h1 class="text-center"></h1>
</div>
</nav><hr>
<div class="row"> <br></div>
<div class="row">
<div class="col-md-6 col-sm-12 mx-auto col-md-offset-3">
<div class=" jumbotron card card-body bg-light mt-5">
<h2 clas="text-center">Reset Password For Departments</h2>
<p></p>
<form action="<?php echo URLROOT; ?>/actions/__forgot_pass.php" method="post">
<div>
<?php
//this will display any kind of error/success message
flash();
?>
</div>
<div class="form-group">
<label for="email">Email: <sup>*</sup></label>
<input type="email" name="email" class="form-control form-control-lg" placeholder="Enter Department Email" required>
</div>
<div class="form-group">
<div class="">
<label for="dept_id">DEPARTMENT: <sup>*</sup></label>
<!--begin option-->
<?php
//code for fetching the suppliers' information
require_once 'db.php';
$sql = "SELECT * FROM `department` WHERE `dept_id` <> '1'";
$query = $conn->query($sql);
echo "<select class='form-control id='dept_id' name='dept_id' required>";
echo"<option value=''>Select Department</option>";
while($row = $query->fetch_assoc()){
echo"<option value='".$row['dept_id']."'>".$row['dept_name']."</option>";
}
echo"</select>";
$conn->close();
?>
<!--end-->
</div>
</div>
<div class="form-group">
<input type="submit" value="RESET" name="submit" class="btn btn-success ">
</div>
</form>
</div>
</div>
</div>
<?php require_once './includes/footer.php'; ?>