-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathchangePasswd.php
More file actions
33 lines (31 loc) · 1.14 KB
/
Copy pathchangePasswd.php
File metadata and controls
33 lines (31 loc) · 1.14 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
<!DOCTYPE html>
<?php
session_start(); // Start the session
// Check if the user is logged in (i.e., username session is set)
if (!isset($_SESSION['userid'])) {
// If not logged in, redirect to the login page
header("Location: login.html");
exit;
}
?>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Change Password</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<div class="login-container">
<h1>Change Password</h1>
<form id="loginForm">
<input type="password" name="old_password" id="old_password" placeholder="Old password" required>
<input type="password" name="new_password" id="new_password" minlength="10" placeholder="New password" required>
<input type="password" name="confirm_password" id="confirm_password" placeholder="Confirm password" required>
<button type="submit">Update Password</button>
</form>
<p id="error-message" class="error-message">Incorrect password</p>
</div>
<script src="changePasswd.js"></script>
</body>
</html>