-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreg.php
227 lines (177 loc) · 8.63 KB
/
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
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
<?php error_reporting(0);?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>reg</title>
<link rel="stylesheet" href="css/form1.css">
<!---------------------------------------------to apply animation-------------------------------------------------------------------->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.7.2/animate.min.css">
</head>
<body>
<?php include("nav-bar.php"); ?>
<section class="background ">
<div class="forminfo animated lightSpeedIn">
<?php session_start(); ?>
<form method="POST" action="registration_action.php" enctype="multipart/form-data">
<div class="head"> <p>Student Registration</p></div>
<p class="name">FIRST NAME</p>
<p> <input type="text" name="fname" placeholder="First Name" class="field"></p>
<div class="start">
<?php if(isset($_SESSION['error'][0]) and $_SESSION['error'][0]!="")
{
echo $_SESSION['error'][0];
unset($_SESSION['error'][0]);
}?>
</div>
<p class="name">LAST NAME</p>
<p> <input type="text" name="lname" placeholder="Last Name" class="field"></p>
<div class="start">
<?php if(isset($_SESSION['error'][1]) and $_SESSION['error'][1]!="")
{
echo $_SESSION['error'][1];
unset($_SESSION['error'][1]);
}?>
</div>
<p class="name">COLLEGE NAME</p>
<p><input type="text" name="college" placeholder="College" class="field"></p>
<div class="start">
<?php if(isset($_SESSION['error'][2]) and $_SESSION['error'][2]!="")
{
echo $_SESSION['error'][2];
unset($_SESSION['error'][2]);
}?>
</div>
<p class="name">COURSE</p>
<p><input type="text" name="course" placeholder="Course" class="field"></p>
<div class="start">
<?php if(isset($_SESSION['error'][3]) and $_SESSION['error'][3]!="")
{
echo $_SESSION['error'][3];
unset($_SESSION['error'][3]);
}?>
</div>
<p class="name">YEAR/SEMESTER</p>
<p><select class="field" name="year">
<option>------------------------------------Choose Option-------------------------------------</option>
<option>1st year</option>
<option>2nd year</option>
<option>3rd year</option>
<option>1st semester</option>
<option>2nd semester</option>
<option>3rd semester</option>
<option>4th semester</option>
<option>5th semester</option>
<option>6th semester</option>
</select>
</p>
<div class="start">
<?php if(isset($_SESSION['error'][4]) and $_SESSION['error'][4]!="")
{
echo $_SESSION['error'][4];
unset($_SESSION['error'][4]);
}?>
</div>
<p class="name">EMAIL</p>
<p><input type="text" name="email" placeholder="Email" class="field"></p>
<div class="start">
<?php if(isset($_SESSION['error'][5]) and $_SESSION['error'][5]!="")
{
echo $_SESSION['error'][5];
unset($_SESSION['error'][5]);
}?>
<?php if(isset($_SESSION['error'][6]) and $_SESSION['error'][6]!="")
{
echo $_SESSION['error'][6];
unset($_SESSION['error'][6]);
}?>
</div>
<p class="name">PASSWORD</p>
<p>
<input type="password" name="pass" placeholder="Password" class="pass">
<input type="password" name="pass" placeholder="Confirm Password" class="pass">
</p>
<div class="start">
<?php if(isset($_SESSION['error'][7]) and $_SESSION['error'][7]!="")
{
echo $_SESSION['error'][7];
unset($_SESSION['error'][7]);
}?>
</div>
<p class="name">CONTACT NUMBER</p>
<p><input type="text" name="contact" placeholder="contact" class="field"></p>
<div class="start">
<?php if(isset($_SESSION['error'][9]) and $_SESSION['error'][9]!="")
{
echo $_SESSION['error'][9];
unset($_SESSION['error'][9]);
}?>
<?php if(isset($_SESSION['error'][10]) and $_SESSION['error'][10]!="")
{
echo $_SESSION['error'][10];
unset($_SESSION['error'][10]);
}?>
</div>
<p class="name">UPLOAD IMAGE</p>
<p><input type="file" name="id" accept="image/jpeg" class="field"></p>
<div class="start">
<?php if(isset($_SESSION['error'][11]) and $_SESSION['error'][11]!="")
{
echo $_SESSION['error'][11];
unset($_SESSION['error'][11]);
}?>
<?php if(isset($_SESSION['error'][12]) and $_SESSION['error'][12]!="")
{
echo $_SESSION['error'][12];
unset($_SESSION['error'][12]);
}?>
</div>
<p class="name">EVENT</p>
<table>
<tr>
<td> <input type="checkbox" name="event[]" value="Code-War">Code-War</td>
<td><input type="checkbox" name="event[]" value="design-Mania">Design-Mania</td>
<td><input type="checkbox" name="event[]" value="Singing">Singing</td>
</tr>
<tr>
<td><input type="checkbox" name="event[]" value="Dance">Dance</td>
<td><input type="checkbox" name="event[]" value="Debate(hindi)">Debate(hindi)</td>
<td><input type="checkbox" name="event[]" value="Debate(English)">Debate(English)</td>
</tr>
<tr>
<td><input type="checkbox" name="event[]" value="Quiz">Quiz</td>
<td><input type="checkbox" name="event[]" value="Play with words">Play with words</td>
<td><input type="checkbox" name="event[]" value="Fantoosh-The mimicry contest">Fantoosh-The mimicry contest</td>
</tr>
<tr>
<td><input type="checkbox" name="event[]" value="Parwaaz(hindi)">Parwaaz(hindi)</td>
<td><input type="checkbox" name="event[]" value="Parwaaz(english)">Parwaaz(english)</td>
</tr>
<tr>
<div class="start">
<?php if(isset($_SESSION['error'][13]) and $_SESSION['error'][13]!="")
{
echo $_SESSION['error'][13];
unset($_SESSION['error'][13]);
}?>
</div>
</tr>
</table>
<p>
<input type="submit" name="sub" value="SUBMIT" class="sub">
</p>
<?php
if($_SESSION["Success"]==1)
{
?>
<script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
<?php echo "<script>swal({title: 'Registration Successfull!', text: '', icon: 'success',
button: 'OK',})</script>";
unset($_SESSION["Success"]);
}
?>
</form>
</div>
</section>
</body>
</html>