-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathchangepass.php
More file actions
53 lines (53 loc) · 1.55 KB
/
changepass.php
File metadata and controls
53 lines (53 loc) · 1.55 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
<?php
$title = 'Đổi mật khẩu';
include 'inc/header2.php';
$login_check = Session::get('customer_login');
if ($login_check == false) {
header('Location: dang-nhap.html');
}
$id = Session::get('customer_id');
if ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['save'])) {
$UpdateCustomers = $cs->update_pass($_POST, $id);
}
?>
</div>
<?php
include 'inc/sidebar.php';
?>
<h2 class="title2">Đổi mật khẩu</h2>
<div class="row">
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
<table>
<tr>
<?php
if (isset($UpdatePass)) {
echo '<td colspan="3">' . $UpdatePass . '</td>';
}
?>
</tr>
<tr>
<td>Mật khẩu cũ</td>
<td><input name="oldpass" type="text" class="form-input" value=""></td>
</tr>
<tr>
<td>Mật khẩu mới</td>
<td><input name="newpass" type="text" class="form-input" value=""></td>
</tr>
<tr>
<td>Nhập lại mật khẩu</td>
<td><input name="repass" type="text" class="form-input" value=""></td>
</tr>
<tr>
<td colspan="2"><button name="save" type="submit">Lưu</button></td>
</tr>
</table>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
<?php
include 'inc/footer.php';
?>