-
Notifications
You must be signed in to change notification settings - Fork 74
/
Copy pathAccount.html
69 lines (59 loc) · 2.26 KB
/
Account.html
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
69
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Accounts</title>
<link rel="stylesheet" href="/CSS/account.css">
</head>
<body>
<!-------add your functionality here-->
<div class="container">
<div id="login-form">
<h2>Login</h2>
<form>
<label for="username">Username:</label>
<input type="text" id="username" name="username" required>
<br>
<label for="password">Password:</label>
<input type="password" id="password" name="password" required>
<br>
<button type="submit">Login</button>
</form>
<h2>Forgot Password</h2>
<form action="forgot-password.php" method="post">
<label for="email">Email:</label>
<input type="email" id="email" name="email" required>
<br>
<button type="submit">Send Password Reset Link</button>
</form>
<div class="back-to-home-button">
<a href="index.html">Back to Home</a>
</div>
</div>
<div id="logout-form" style="display: none;">
<h2>Logged In</h2>
<button id="logout-button">Logout</button>
</div>
</div>
<script>
// JavaScript to handle login and logout logic
const loginForm = document.getElementById('login-form');
const logoutForm = document.getElementById('logout-form');
const logoutButton = document.getElementById('logout-button');
// Simulate successful login (replace with actual authentication logic)
loginForm.addEventListener('submit', (event) => {
event.preventDefault();
// Assuming successful login
loginForm.style.display = 'none';
logoutForm.style.display = 'block';
});
// Simulate logout (replace with actual logout logic)
logoutButton.addEventListener('click', () => {
// Assuming successful logout
logoutForm.style.display = 'none';
loginForm.style.display = 'block';
});
</script>
</body>
</html>