-
Notifications
You must be signed in to change notification settings - Fork 0
/
login.html
60 lines (42 loc) · 2.06 KB
/
login.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
<!DOCTYPE html>
<html>
<head>
<title>Registration Page</title>
<link rel="stylesheet" href="login.css">
</head>
<body>
<!-- <script></script> -->
<div class="form-container">
<h1>Registration</h1>
<form id="registrationForm" action="/register" method="post" >
<label for="name">Name:</label>
<input type="text" id="name" name="name" placeholder="Ex- piyush" required><br>
<label for="gender">Gender:</label>
<select id="gender" name="gender" required>
<option value="male">Male</option>
<option value="female">Female</option>
<option value="other">Other</option>
</select><br>
<label for="phone">Phone Number:</label>
<input type="tel" id="phone" name="phone" placeholder="1234...." required><br>
<label for="email">Email:</label>
<input type="email" id="email" name="email" placeholder="abc@..." required><br>
<label for="password">Password:</label>
<input type="password" id="password" name="password" placeholder="password" required><br>
<!-- Additional fields or form validation can be added here -->
<input type="submit" value="Register">
</form>
<script>
// Add an event listener to handle registration form submission
document.getElementById('registrationForm').addEventListener('submit', function(event) {
event.preventDefault(); // Prevent form submission to the server
// Perform registration form validation and processing here
// ...
// After successful registration, redirect to login2 page
alert('Successfully registered! You will now be redirected to the login2 page.');
window.location.href = 'login2.html'; // Replace 'login2.html' with the actual filename of your login2 page
});
</script>
</div>
</body>
</html>