-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsignup.html
134 lines (114 loc) · 3.33 KB
/
signup.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Signup Form</title>
<link rel="stylesheet" href="styles.css">
<style>
body {
font-family: Arial, sans-serif;
background-color: #f7f7f7;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
}
.form-container {
background-color: #fff;
padding: 20px;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
width: 300px;
}
h1 {
margin-bottom: 20px;
margin-top: 10px;
text-align: center;
font-family: 'Times New Roman', Times, serif;
color:#9c5ca8;
}
label {
display: block;
margin: 10px 0 5px;
font-family: 'Times New Roman', Times, serif;
font-size: large;
}
input[type="text"],
input[type="email"],
input[type="password"] {
width: 80%;
padding: 8px;
margin-left: 10px;
margin-bottom: 10px;
border: 1px solid #ccc;
border-radius: 4px;
display: flex;
font-family: 'Times New Roman', Times, serif;
}
button {
width: 70%;
padding: 8px;
margin-left: 40px;
margin-top: 18px;
margin-bottom: 15px;
background-color: #c27ed3;
border: none;
border-radius: 4px;
color: rgb(253, 253, 253);
font-size: 16px;
cursor: pointer;
font-family: 'Times New Roman', Times, serif;
}
button:hover {
background-color: #d760ec;
}
.existing-account {
text-align: center;
margin-top: 10px;
}
.existing-account p {
margin: 0;
margin-bottom: 10px;
}
.existing-account a {
color: #b78dbd;
text-decoration: none;
}
.existing-account a:hover {
text-decoration: underline;
}
</style>
</head>
<body>
<div class="form-container">
<form action="/submit" method="post">
<h1>Signup Form</h1>
<label for="username">Name:</label>
<input type="text" id="usernameame" placeholder="username..." name="username" required>
<label for="email">Email:</label>
<input type="email" id="email"placeholder="useremail..." name="email" required>
<label for="password">Password:</label>
<input type="password" id="password" placeholder="userpassword..."name="password" required>
<label for="confirm_password">Confirm Password:</label>
<input type="password" id="confirm_password"placeholder="confirm password..." name="confirm_password" required>
<button type="submit">Sign Up</button>
<div class="existing-account">
<p>Already have an account? <a href="/login">Log in here</a></p>
</div>
</form>
</div>
<script>
document.querySelector('form').addEventListener('submit', function(event) {
const password = document.getElementById('password').value;
const confirmPassword = document.getElementById('confirm_password').value;
if (password !== confirmPassword) {
alert('Passwords do not match.');
event.preventDefault();
}
});
</script>
</body>
</html>
</html>