-
Notifications
You must be signed in to change notification settings - Fork 1
/
signUpRenter.php
212 lines (178 loc) · 5.62 KB
/
signUpRenter.php
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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
<?php
include 'header.php';
include 'db.php';
?>
<!DOCTYPE html>
<html lang="en">
<head>
<style>
body{
background-color: grey;
}
.panel-success{
background-color:#f0f0f0;
opacity: ;
filter: alpha(opacity=100);
padding-top: 50px;
width: 60%;
}
#headertop {
margin: 0px;
width: 100%;
height: 650px;
font-family: 'Open Sans', sans-serif;
}
#headertop h2 {
position: absolute;
margin-left: 375px;
margin-right: 375px;
margin-top: 178px;
line-height: 45px;
font-size: 50px;
color: #33CCFF;
width: 550px;
height: 100%;
}
h2{
color:#000000;
}
#fm{
color:black;
object-position:
}
.invalid{
color: red;
}
.invalid:before {
position: relative;
left: -35px;
content: "✖";
}
</style>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script>
function validateForm() {
var input = document.getElementById('tel');
input.oninvalid = function(event) {
event.target.setCustomValidity('10 digit Number');
}
var name = document.form["ClientSignUp"]["name"].value;
var address = document.form["ClientSignUp"]["address"].value;
var gender = document.form["ClientSignUp"]["gender"].value;
var age=document.form["ClientSignUp"]["age"].value;
var cno = document.form["ClientSignUp"]["cno"].value;
var email = document.form["ClientSignUp"]["email"].value;
var pwd = document.form["ClientSignUp"]["pwd"].value;
var cnfpwd = document.form["ClientSignUp"]["cnfpwd"].value;
if(form.pwd.value != "")
{
if(form.pwd.value != form.cnfpwd.value){
alert("Error: Please check that you've entered and confirmed your password!");
form.pwd.focus();
return false;
}
if(form.pwd.value.length < 8) {
alert("Error: Password must contain at least eight characters!");
form.pwd1.focus();
return false;
}
if(form.pwd.value == form.username.value) {
alert("Error: Password must be different from Username!");
form.pwd1.focus();
return false;
}
re = /[0-9]/;
if(!re.test(form.pwd.value)) {
alert("Error: password must contain at least one number (0-9)!");
form.pwd.focus();
return false;
}
re = /[a-z]/;
if(!re.test(form.pwd.value)) {
alert("Error: password must contain at least one lowercase letter (a-z)!");
form.pwd.focus();
return false;
}
re = /[A-Z]/;
if(!re.test(form.pwd.value)) {
alert("Error: password must contain at least one uppercase letter (A-Z)!");
form.pwd.focus();
return false;
}
}
}
</script>
</head>
<body>
<br><br>
<div class="container">
<div class="container panel panel-success" >
<div class="panel-heading text-center" style="background-color: "><h2 style="background-color:;">One More step and you're good to go !! </h2></div>
<br>
<form id="form" class="form-horizontal panel-body" method="post" enctype="multipart/form-data" action="signUpRenterExe.php">
<div class="form-group" id="fm">
<label class="control-label col-sm-4"for="name">Name :</label>
<div class="col-sm-5">
<input id="text" type="text" class="form-control" id="name" placeholder="Enter Name" name="name" required>
</div>
</div>
<div class="form-group" id="fm">
<label class="control-label col-sm-4" for="mname">Address :</label>
<div class="col-sm-5">
<input id="text" type="text" class="form-control" id="address" placeholder="Enter Complete address for contact" name="address" required>
</div>
</div>
<div class="form-group" id="fm">
<label class="control-label col-sm-4" for="gender">Gender :</label>
<div class="col-sm-5">
<input id="radio" type="radio" checked="checked" name="gender" value="female" required>
<span class="checkmark"></span>Female
 
<input id="radio" type="radio" name="gender" value="male">
<span class="checkmark "></span>Male</br>
</div>
</div>
<div class="form-group" id="fm">
<label class="control-label col-sm-4" for="name">Age :</label>
<div class="col-sm-5">
<input id="number" type="number" class="form-control" id="address" placeholder="Age" name="age" min="18" size="10px" required>
</div>
</div>
<div class="form-group" id="fm">
<label class="control-label col-sm-4" for="name">Contact No. :</label>
<div class="col-sm-5">
<input id="tel" type="number" class="form-control" id="address" placeholder="XX-XXXX-XXXX" name="cno" required pattern="[0-9]{1,10}">
</div>
</div>
<div class="form-group" id="fm">
<label class="control-label col-sm-4" for="Email">Email:</label>
<div class="col-sm-5">
<input type="email" class="form-control" id="email" placeholder="[email protected]" name="email" required>
</div>
</div>
<div class="form-group" id="fm">
<label class="control-label col-sm-4" for="pwd">Password :</label>
<div class="col-sm-5">
<input type="password" class="form-control" id="pwd" placeholder="Enter password" name="pwd" required>
</div>
</div>
<div class="form-group" id="fm">
<label class="control-label col-sm-4" for="pwd">Confirm Password :</label>
<div class="col-sm-5">
<input type="password" class="form-control" id="cnfpwd" placeholder="Re-enter password" name="cnfpwd" required>
</div>
</div>
<br><br>
<div class="text-center">
<input type="submit" class="btn btn-success btn-sx" value="Submit" onclick="return validateForm()">
 <input type="reset" class="btn btn-danger">
</div>
</form>
</div>
<p>
 
</p>
</div>
</body>
</html>