-
Notifications
You must be signed in to change notification settings - Fork 0
/
signin.html
50 lines (42 loc) · 1.76 KB
/
signin.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
<!DOCTYPE html>
<html>
<head>
<title>Login Page</title>
<link rel="stylesheet" type="text/css" href="css/styles.css">
</head>
<body>
<div class="container">
<h2>Sign up</h2>
<form action="signin.php" method="post" onsubmit="return validateForm()">
<label for="firstname">First name:</label>
<input type="text" name="firstname" required><br><br>
<label for="Lastname">Last name:</label>
<input type="text" name="lastname" required><br><br>
<label for="Email">Email:</label>
<input type="text" name="email" required><br><br>
<label for="Username">Username:</label>
<input type="text" name="username" required><br><br>
<label for="password">Password:</label>
<input type="password" id="password" name="password" required><br><br>
<label for="confirmPassword">Confirm Password:</label>
<input type="password" id="confirmPassword" name="confirmPassword" required>
<div id="passwordError" class="error-message"></div><br>
<input class="signup-button" type="submit" value="Register">
</form>
</div>
</body>
<script>
function validateForm() {
var password = document.getElementById('password').value;
var confirmPassword = document.getElementById('confirmPassword').value;
var errorDiv = document.getElementById('passwordError');
if (password !== confirmPassword) {
errorDiv.innerHTML = 'Passwords do not match';
return false;
} else {
errorDiv.innerHTML = '';
return true;
}
}
</script>
</html>