-
Notifications
You must be signed in to change notification settings - Fork 0
/
registration.php
285 lines (232 loc) · 9.7 KB
/
registration.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
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
<?php
include ("connection.php");
?>
<!DOCTYPE html>
<html>
<head>
<title>My Project</title>
<link rel="stylesheet" type="text/css" href="css1\bootstrap.min.css">
<style type="text/css">
body{
background-color: #253138;
color: white;
font-family: 'Raleway', sans-serif;
letter-spacing: 0.06em;
}
.container{
background-color: #253138;
text-align: center;
}
fieldset{
background-color: #253138;
}
.colorchange{
font-family: 'Pacifico', cursive;
color: white;
text-align: center;
animation: cc 2s infinite;
font-size: 50px;
}
@font-face{
font-family: "Pacifico";
src: url("fonts/Pacifico/Pacifico-Regular.ttf")
}
.btn{
border:none;
background: #fff;
letter-spacing: 0.25em;
font-weight: 700;
font-size: 20px;
text-transform: uppercase;
color: #111;
padding: 15px 25px;
margin: 30px 0 0 30px;
transition:all 0.3s linear;
}
.btn:hover{
background: rgba(255,0,0,0.7);
color: white;
}
</style>
<script src="js1\bootstrap.min.js"></script>
<script src="jquery-3.4.1.min.js"></script>
</head>
<body>
<div class="container">
<div class="container">
<h1><span class="colorchange">Registration Form</span></h1>
</div>
</div>
<br>
<br>
<div class="container">
<form class=" form-horizontal" action="registration.php" method="post">
<fieldset>
<div class="form-group">
<label class="col-md-4 control-label">Name</label>
<div class="col-md-4 inputGroupContainer">
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-user"></i></span>
<input name="name" placeholder="Enter Your Name" class="form-control" type="text" required="1" title="only contain letters">
</div>
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label" >Email</label>
<div class="col-md-4 inputGroupContainer">
<div class="input-group ">
<span class="input-group-addon"><i class="glyphicon glyphicon-envelope"></i></span>
<input name="email" placeholder="[email protected]" class="form-control" type="email" required="1" pattern="[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,}$" title="charactor followed by an '@' sign, followed by more charactor and than '.' sign and at least 2 charactor">
</div>
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label" >Contact NO.</label>
<div class="col-md-4 inputGroupContainer">
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-earphone"></i></span>
<input name="contact" placeholder="Ex. 95XXXXXXXX" class="form-control" type="text" maxlength="10" pattern="[0-9]{10}" required="1" title="only contain numbers">
</div>
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label">Degree</label>
<div class="col-md-4 selectContainer">
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-education"></i></span>
<select name="degree" class="form-control selectpicker">
<option>Select your Degree</option>
<option value='B.Tech(CE)'>B.Tech(CE)</option>
<option value='B.Tech(IT)'>B.Tech(IT)</option>
<option value='B.Tech(EC)' >B.Tech(EC)</option>
<option value='B.Tech(ME)'>B.Tech(ME)</option>
<option value='B.Tech(CL)'>B.Tech(CL)</option>
<option value='B.Tech(EE)'>B.Tech(EE)</option>
</select>
</div>
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label">University Name</label>
<div class="col-md-4 inputGroupContainer">
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-book"></i></span>
<input name="collage" placeholder="Enter College Name" class="form-control" type="text" required="1" pattern="[A-Za-z]{}" title="only contain letters">
</div>
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label">Duration</label>
<div class="col-md-4 selectContainer">
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-list"></i></span>
<select name="duration" class="form-control selectpicker" required="1">
<option value="">Select Duration</option>
<option value="2 Week">2 Week</option>
<option value="4 Week">4 Week</option>
<option value="6 Week">6 Week</option>
<option value="8 Week">8 Week</option>
<option value="12 Week">12 Week</option>
</select>
</div>
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label">Techhnology Use</label>
<div class="col-md-4 selectContainer">
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-tasks"></i></span>
<select name="technology" class="form-control selectpicker" required="1">
<option value="">Select Techhnology</option>
<option value="PHP">PHP</option>
<option value=".net">.net</option>
<option value="Android">Android</option>
<option value="Java">Java</option>
<option value="Python">Python</option>
<option value="IOT">IOT</option>
<option value="Cloud Computing">Cloud Computing</option>
<option value="GIS">GIS</option>
<option value="Artificial Intelligence">Artificial Intelligence</option>
<option value="Web Development">Web Development</option>
</select>
</div>
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label">Guide Name </label>
<div class="col-md-4 inputGroupContainer">
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-user"></i></span>
<input name="guide" placeholder="Enter Project Guide Name" class="form-control" type="text" required="1" title="only contain letters">
</div>
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label">Join Date</label>
<div class="col-md-4 inputGroupContainer">
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-calendar"></i></span>
<input name="date" class="form-control " type="date" required="1">
</div>
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label">NOC </label>
<div class="col-md-7 inputGroupContainer">
<div class="input-group">
<table border="0" width="100%">
<tr>
<td>   Yes<input name="noc" class="form-control" type="radio" checked='1' value='Yes'>   <br></td>
<td>     No<input name="noc" class="form-control" type="radio" value='No'>      </td>
</tr>
</table>
</div>
</div>
</div>
<br>
<div class="form-group">
<label class="col-md-4 control-label"></label>
<div class="col-md-4"><br>
              <input type="submit" name='submit' value='submit' class="btn">
</div>
</div>
</fieldset>
</form>
</div>
</body>
</html>
<?php
include('connection.php');
if(isset($_POST['submit'])){
$name=$_POST['name'];
$email=$_POST['email'];
$contact=$_POST['contact'];
$degree=$_POST['degree'];
$collage=$_POST['collage'];
$dur=$_POST["duration"];
$tech=$_POST["technology"];
$guide=$_POST["guide"];
$date=$_POST["date"];
$noc=$_POST["noc"];
if ($name=='' || $email=='' || $contact=='' || $degree=='' || $collage=='' || $dur=='' || $tech=='' || $guide=='' || $date=='' || $noc=='') {
echo "<script>alert('please fill all field');<script>";
}
else{
$que = "INSERT INTO u_reg (u_name,u_email,u_contact,u_degree,u_college,u_dur,u_tech,u_guide,u_jdate,u_NOC) VALUES('$name','$email','$contact','$degree','$collage','$dur','$tech','$guide','$date','$noc')";
$query=mysqli_query($conn,$que);
if($query)
{
$reg="SELECT u_id FROM u_reg WHERE u_name LIKE '$name'and u_email LIKE '$email'and u_contact LIKE '$contact'and u_degree LIKE '$degree'and u_college LIKE '$collage' and u_dur LIKE '$dur' and u_tech LIKE '$tech' and u_guide LIKE '$guide' and u_jdate LIKE '$date' and u_NOC LIKE '$noc' ";
$query1=mysqli_query($conn,$reg);
while($run=mysqli_fetch_array($query1))
{
$u_id=$run[0];
echo "<script>window.alert('Registration no is: $u_id')</script>";
}
}
else{
echo "Registration Failed";
}
}
}
?>