-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlog-reg.php
180 lines (170 loc) · 9.56 KB
/
log-reg.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
<!DOCTYPE HTML>
<html>
<head>
<title>Footwear - Free Bootstrap 4 Template by Colorlib</title>
<?php
include("head.php");
include("navbar.php");
?>
<script type="text/javascript" src="logvalid.js"></script>
</head>
<body>
<div class="colorlib-loader"></div>
<div id="page">
<?php
include("breadcrumbs.php");
?>
<br><br>
<div class="container">
<div class="row">
<div class="col-sm-6">
<div class="card">
<div class="card-body" align="center">
<h3 class="card-title">Login</h3>
<div class="contact-wrap">
<form name="log" method="POST" action="login.php">
<div class="row">
<div class="col-sm-12">
<div class="form-group">
<label for="userName">Username</label>
<input type="text" name="userName" id="userName" class="form-control" placeholder="Provide your valid Username">
<div class="container">
<div class="row container" id="errDivuser1" style="color:red"></div>
</div>
</div>
</div>
<div class="col-sm-12">
<div class="form-group">
<label for="logpass">Password</label>
<input type="password" name="logpass" id="logpass" class="form-control" placeholder="Provide your valid password">
<div class="container">
<div class="row container" id="errDivpass1" style="color:red"></div>
</div>
</div>
</div>
<div class="col-sm-12">
<div class="form-group">
<input type="submit" name="login" value="login" onclick="loginvalid(event)" class="btn btn-primary">
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="card">
<div class="card-body"><center>
<h3 class="card-title">REGISTER</h3></center>
<div class="contact-wrap">
<form name="Valid" method="POST" action="insert_register.php">
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label for="fname">First Name</label>
<input type="text" name="fname" id="fname" class="form-control" placeholder="Your firstname">
<div class="container">
<div class="row container" id="errDivfname" style="color:red"></div>
</div>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label for="lname">Last Name</label>
<input type="text" name="lname" id="lname" class="form-control" placeholder="Your lastname">
<div class="container">
<div class="row container" id="errDivlname" style="color:red"></div>
</div>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label for="regusername">Username</label>
<input type="text" name="regusername" id="regusername" class="form-control" placeholder="Provide your valid username">
<div class="container">
<div class="row container" id="errDivuser" style="color:red"></div>
</div>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label for="email">Email</label>
<input type="email" name="email" id="email" class="form-control" placeholder="Your email address">
<div class="container">
<div class="row container" id="errDivemail" style="color:red"></div>
</div>
</div>
</div>
<div class="col-md-12">
<div class="form-group">
<label for="mobile">Mobile</label>
<input type="text" name="mobile" id="mobile" class="form-control" minlength="10" maxlength="10" onkeypress="restrictAlphabets(event)" placeholder="Require your mobile">
<div class="container">
<div class="row container" id="errDivmob" style="color:red"></div>
</div>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label for="compass">Password</label>
<input type="password" name="password" id="password" class="form-control" placeholder="Require your Password">
<div class="container">
<div class="row container" id="errDivpass" style="color:red"></div>
</div>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label for="conpass">Confirm Password</label>
<input type="password" name="conpass" id="conpass" class="form-control" placeholder="Require your Password">
<div class="container">
<div class="row" id="errDivcpass" style="color:red"></div>
</div>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<input type="submit" value="Submit" class="btn btn-primary" onclick="valid(event)">
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="gototop js-top">
<a href="#" class="js-gotop"><i class="ion-ios-arrow-up"></i></a>
</div>
<script>
function loginvalid(e)
{
let user = document.forms["log"]["username"];
let pass = document.forms["log"]["logpass"];
let erruser = "";
let errpass = "";
if (user.value == "") {
erruser = erruser + "<br>Enter valid Username";
}
if (pass.value.trim() == ""){
errpass = errpass + "<br>Enter valid Password";
}
if (erruser != "") {
document.getElementById("errDivuser1").innerHTML = erruser;
e.preventDefault();
}
if (errpass != "") {
document.getElementById("errDivpass1").innerHTML = errpass;
e.preventDefault();
}
}
</script>
<?php
include("footer.php");
include("footer_links.php");
?>
</body>
</html>