-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreg_ac.php
163 lines (121 loc) · 5.92 KB
/
reg_ac.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
<?php
include ('.\includes\h.php');
?>
<ul class="nav nav-tabs" role="tablist">
<li class="nav-item">
<a class="nav-link active" data-toggle="tab" href="#org">Organizer</a>
</li>
<li class="nav-item">
<a class="nav-link" data-toggle="tab" href="#par">Participant</a>
</li>
</ul>
<div class="tab-content">
<div id="org" class="container tab-pane active"><br>
<form action="reg_insert.php" method="POST" id="fr" onsubmit="return valid1()" style="margin-right: 10%; margin-left: 10%">
<div class="form-group">
<label for="usrn">Name:</label>
<input type="text" class="form-control" id="nam" name="o_id">
</div>
<div class="form-group ">
<label for="usre">Email:</label>
<input type="email" class="form-control" id="email_o" name="email">
</div>
<div class="form-group">
<label for="usrpn">phno:</label>
<input type="tel" class="form-control" id="o_ph" name="p_no" maxlength="10" minlength="10">
</div>
<div class="form-group">
<label for="pwd">Password:</label>
<input type="password" class="form-control" id="pswdo" name="pswd" minlength="8" maxlength="16" pattern="(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,}" title="Must contain at least one number and one uppercase and lowercase letter, and at least 8 or more characters" required>
</div>
<div class="form-group">
<label for="pwd">Confirm Password:</label>
<input type="password" class="form-control" id="pswdo1" name="pswd" minlength="8" maxlength="16">
</div>
<button type="submit" class="btn btn-primary">Submit</button>
</form>
</div>
<SCRIPT>
function valid1(){
var x= document.forms["fr"]["nam"].value;
var y= document.forms["fr"]["email_o"].value;
var z= document.forms["fr"]["o_ph"].value;
var w= document.forms["fr"]["pswdo"].value;
var p= document.forms["fr"]["pswdo1"].value;
if (x == ""||y == ""||z == ""||w == ""||p =="") {
window.alert("Fill all the details");
return false;
}
if (pswdo.value != pswdo1.value)
{
window.alert("both the password should match ");
return false;
}
}
function frm2(){
var a= document.forms["f"]["nam1"].value;
var b= document.forms["f"]["email_p"].value;
var d= document.forms["f"]["pswdp"].value;
// var e= document.forms["frp"]["chkb"].value;
var e= document.forms["f"]["agep"].value;
if (a == ""||b == ""||d == ""||e =="") {
window.alert("Fill all the details");
return false;
}
if (pswdp.value != pswdop.value)
{
window.alert("both the password should match ");
return false;
}
if (agep.value < 1)
{
window.alert("age should be valid");
return false;
}
}
</SCRIPT>
<div id="par" class="container tab-pane "><br>
<form id="f" onsubmit="return frm2()" action="parti_insert.php" method="POST" style="margin-right: 10%; margin-left: 10%" >
<div class="form-group">
<label for="parn">Name:</label>
<input type="text" class="form-control" id="nam1" name="name">
</div>
<div class="form-group ">
<label for="pare">Email:</label>
<input type="email" class="form-control" id="email_p" name="email">
</div>
<div class="form-group">
<div class="form-group">
<label for="ppwd">Password:</label>
<input type="password" class="form-control" id="pswdp" name="pswd" maxlength="16" minlength="8" pattern ="(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,}" title="Must contain at least one number and one uppercase and lowercase letter, and at least 8 or more characters" required>
</div>
<label for="pwd">Confirm Password:</label>
<input type="password" class="form-control" id="pswdop" name="pswd" minlength="8" maxlength="16">
<label for="pic">Interested Categories:</label>
<div class="custom-control " id="chkb">
<input type="radio" class="custom-control-input" id="customCheck" name="cat" value="Sports">
<label class="custom-control-label" for="customCheck">Sports</label>
</div>
<div class="custom-control custom-checkbox mb-3">
<input type="radio" class="custom-control-input" id="customCheck" name="cat" value="Performing Arts">
<label class="custom-control-label" for="customCheck">Performing Arts</label>
</div>
<div class="custom-control custom-checkbox mb-3">
<input type="radio" class="custom-control-input" id="customCheck" name="cat" value="Educational">
<label class="custom-control-label" for="customCheck">Educational</label>
</div>
<div class="custom-control custom-checkbox mb-3">
<input type="radio" class="custom-control-input" id="customCheck" name="cat" value="College">
<label class="custom-control-label" for="customCheck">Collage</label>
</div><br>
<div class="form-group">
<label for="page">Age</label>
<input type="text" class="form-control" id="agep" name="age" maxlength="3">
</div><br>
<button type="submit" class="btn btn-primary">Submit</button>
</div>
</form>
</div>
<?php
include('.\includes\f.php');
?>