-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprizereg.php
346 lines (291 loc) · 12 KB
/
prizereg.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
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
<?php
include 'connection.php';
?>
<!DOCTYPE html>
<html lang="en">
<head>
<!--===============================================
Template Design By WpFreeware Team.
Author URI : http://www.wpfreeware.com/
====================================================-->
<!-- Basic Page Needs
================================================== -->
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>MyNim's : Prize Claim Registration</title>
<?php
include 'assets/assets-css.php';
?>
</head>
<body>
<div class="modal fade" id="myModal" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title"></h4>
</div>
<div class="modal-body" align="center">
Some text in the modal.
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<!-- SCROLL TOP BUTTON -->
<a class="scrollToTop" href="#"></a>
<!-- END SCROLL TOP BUTTON -->
<?php
include 'navbar/navbar.php';
?>
<!--=========== BEGIN COURSE BANNER SECTION ================-->
<section id="imgBanner">
<h2>Prize Claim Registration</h2>
</section>
<!--=========== END COURSE BANNER SECTION ================-->
<!--=========== BEGIN CONTACT SECTION ================-->
<section id="contact">
<div class="container">
<div class="row">
<div class="col-lg-12 col-md-12">
<div class="title_area">
<!-- <h2 class="title_two">We are Wpf Degree</h2>
<span></span>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book</p>
</div> -->
</div>
</div>
<div class="row">
<div class="col-lg-8 col-md-8 col-sm-8">
<div class="contact_form wow fadeInLeft">
<form class="submitphoto_form" action="prizereg.php" method="post">
<!-- <?php
// $result = mysqli_query($conn,"SELECT MAX(FeedbackID)+1 FROM feedback");
// $row = mysqli_fetch_row($result);
// $highest_id = $row[0];
?> -->
<!-- <input type="hidden" class="wp-form-control wpcf7-text" value="<?php // echo $highest_id; ?>" name="feedbackid" id="feedbackid" placeholder="Feedback ID"> -->
<?php
// mysql_connect('localhost', 'root', '');
// mysql_select_db('newsproject');
$sqli1 = "SELECT Name FROM course ";
$result = mysqli_query($conn,$sqli1);
echo "<select id='course' name='course' class='wp-form-control wpcf7-select'>";
echo "<option value='Select Course'>Select Course</option>";
while ($row = mysqli_fetch_array($result)) {
echo "<option value='" . $row['Name'] ."'>" . $row['Name'] ."</option>";
}
echo "</select>";
?>
<?php
// mysql_connect('localhost', 'root', '');
// mysql_select_db('newsproject');
$sqli1 = "SELECT Subject FROM subjects ";
$result = mysqli_query($conn,$sqli1);
echo "<select id='subject' name='subject' class='wp-form-control wpcf7-select'>";
echo "<option value='Select Subject'>Select Subject</option>";
while ($row = mysqli_fetch_array($result)) {
echo "<option value='" . $row['Subject'] ."'>" . $row['Subject'] ."</option>";
}
echo "</select>";
?>
<input type="text" class="wp-form-control wpcf7-text" id="name" name="name" placeholder="Full name">
<select class="wp-form-control wpcf7-select" id="year">
<option value="Select Year">Exam Year</option>
<option>2000</option>
<option>2001</option>
<option>2002</option>
<option>2003</option>
<option>2004</option>
<option>2005</option>
<option>2006</option>
<option>2007</option>
<option>2008</option>
<option>2009</option>
<option>2010</option>
<option>2011</option>
<option>2012</option>
<option>2013</option>
<option>2014</option>
<option>2015</option>
<option>2016</option>
<option>2017</option>
<option>2018</option>
<option>2019</option>
<option>2020</option>
<option>2021</option>
<option>2022</option>
<option>2023</option>
<option>2024</option>
<option>2025</option>
<option>2026</option>
<option>2027</option>
<option>2028</option>
<option>2029</option>
<option>2030</option>
<option>2031</option>
<option>2032</option>
<option>2033</option>
</select>
<?php
date_default_timezone_get("India/Mumbai");
$date1 = date('d/m/y', time());
?>
<input type="date" class="wp-form-control wpcf7-date" value="<?php echo $date1; ?>" id="date1" name="date1" placeholder="Date">
<input type="submit" value="Submit" id="btnsubmit" name="btnsubmit" class="wpcf7-submit">
</form>
</div>
</div>
</section>
<!--=========== END CONTACT SECTION ================-->
<!--=========== BEGIN GOOGLE MAP SECTION ================-->
<!-- <section id="googleMap">
<iframe width="100%" height="500" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://www.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=200+Lincoln+Ave,+Salinas,+CA,+USA&aq=&sll=30.977609,-95.712891&sspn=42.157377,86.572266&ie=UTF8&hq=&hnear=200+Lincoln+Ave,+Salinas,+California+93901-2639&t=m&z=14&ll=36.674837,-121.657691&output=embed"></iframe>
</section> -->
<!--=========== END GOOGLE MAP SECTION ================-->
<!--=========== BEGIN FOOTER SECTION ================-->
<footer id="footer">
<!-- Start footer top area -->
<div class="footer_top">
<div class="container">
<div class="row">
<div class="col-ld-3 col-md-3 col-sm-3">
<div class="single_footer_widget">
<h3>About Us</h3>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.</p>
</div>
</div>
<div class="col-ld-3 col-md-3 col-sm-3">
<div class="single_footer_widget">
<h3>Community</h3>
<ul class="footer_widget_nav">
<li><a href="#">Our Tutors</a></li>
<li><a href="#">Our Students</a></li>
<li><a href="#">Our Team</a></li>
<li><a href="#">Forum</a></li>
<li><a href="#">News & Media</a></li>
</ul>
</div>
</div>
<div class="col-ld-3 col-md-3 col-sm-3">
<div class="single_footer_widget">
<h3>Others</h3>
<ul class="footer_widget_nav">
<li><a href="#">Link 1</a></li>
<li><a href="#">Link 2</a></li>
<li><a href="#">Link 3</a></li>
<li><a href="#">Link 4</a></li>
<li><a href="#">Link 5</a></li>
</ul>
</div>
</div>
<div class="col-ld-3 col-md-3 col-sm-3">
<div class="single_footer_widget">
<h3>Social Links</h3>
<ul class="footer_social">
<li><a data-toggle="tooltip" data-placement="top" title="Facebook" class="soc_tooltip" href="#"><i class="fa fa-facebook"></i></a></li>
<li><a data-toggle="tooltip" data-placement="top" title="Twitter" class="soc_tooltip" href="#"><i class="fa fa-twitter"></i></a></li>
<li><a data-toggle="tooltip" data-placement="top" title="Google+" class="soc_tooltip" href="#"><i class="fa fa-google-plus"></i></a></li>
<li><a data-toggle="tooltip" data-placement="top" title="Linkedin" class="soc_tooltip" href="#"><i class="fa fa-linkedin"></i></a></li>
<li><a data-toggle="tooltip" data-placement="top" title="Youtube" class="soc_tooltip" href="#"><i class="fa fa-youtube"></i></a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<!-- End footer top area -->
<!-- Start footer bottom area -->
<div class="footer_bottom">
<div class="container">
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-6">
<div class="footer_bootomLeft">
<p> Copyright © All Rights Reserved</p>
</div>
</div>
<div class="col-lg-6 col-md-6 col-sm-6">
<div class="footer_bootomRight">
<p>Designed by <a href="http://wpfreeware.com/" rel="nofollow">Wpfreeware.com</a></p>
</div>
</div>
</div>
</div>
</div>
<!-- End footer bottom area -->
</footer>
<!--=========== END FOOTER SECTION ================-->
<?php
include 'assets/assets-js.php';
?>
<script type="text/javascript">
$(document).ready(function() {
$('#btnsubmit').click(function(event) {
event.preventDefault();
// var feedbackid=$('#feedbackid').val();
var course = $('#course').val();
var subject = $('#subject').val();
var name = $('#name').val();
var year = $('#year').val();
var date1 = $('#date1').val();
if(course=='Select Course')
{
$('.modal-body').html("Please Select Your Course ");
$("#myModal").modal();
}
else if(subject=='Select Subject')
{
$('.modal-body').html("Please Select Your Subject ");
$("#myModal").modal();
}
else if(name=='')
{
$('.modal-body').html("Please Enter Your Name ");
$("#myModal").modal();
}
else if(year=='Select Year')
{
$('.modal-body').html("Please Select Your Year ");
$("#myModal").modal();
}
else if(date1=='')
{
$('.modal-body').html("Please Select Your Date ");
$("#myModal").modal();
}
else
{
$.ajax({
type: 'POST',
url: 'prizereg2.php',
data: ({course:course, subject:subject, name:name, year: year, date1: date1 }),
success: function(response)
{
if(response == "1" || response == 1)
{
$('.modal-body').html("Prize Claim Registration Added");
$("#myModal").modal();
setTimeout(function(){
window.location.href='prizereg.php';
}, 1000);
}
else
{
$('.modal-body').html("Prize Claim Registration Not Added");
$("#myModal").modal();
}
}
});
}
});
});
</script>
<!--===============================================
Template Design By WpFreeware Team.
Author URI : http://www.wpfreeware.com/
====================================================-->
</body>
</html>