-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
40 lines (37 loc) · 1.45 KB
/
index.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>School ERP Login</title>
<style>
/* Add your CSS styles here */
</style>
</head>
<body>
<form id="loginForm" action="your_validation_script.php" method="post">
<h2>School ERP Login</h2>
<label for="username">Username</label>
<input type="text" id="username" name="username" required>
<label for="password">Password</label>
<input type="password" id="password" name="password" required>
<input type="submit" value="Login">
</form>
<script>
document.getElementById('loginForm').addEventListener('submit', function(event) {
// Simulating successful login
const username = document.getElementById('username').value;
const password = document.getElementById('password').value;
// Perform validation and authentication here using AJAX or other means
// For demonstration purposes, redirect to personal details page if login is successful
if (username === 'student' && password === 'password') {
event.preventDefault(); // Prevent the form from submitting
window.location.href = 'details.html'; // Redirect to personal details page
} else {
// Handle incorrect login credentials
alert('Incorrect username or password. Please try again.');
}
});
</script>
</body>
</html>