-
Notifications
You must be signed in to change notification settings - Fork 9
/
search.php
103 lines (98 loc) · 2.76 KB
/
search.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
<?php
include("sqlcon.php");
if(!isset($_SESSION['type']))
{
echo "<script>window.location=index.php;</script>";
}
/* ### */ ?>
<?php
include("header.php");
/* ### */ ?>
<script>
function loadalumni(post,region,pyear) {
var xmlhttp=new XMLHttpRequest();
xmlhttp.onreadystatechange=function() {
if (xmlhttp.readyState==4 && xmlhttp.status==200) {
document.getElementById("ajaxoffice").innerHTML=xmlhttp.responseText;
}
}
if(pyear == "")
{
pyear = "0";
}
var link = "ajaxalumni.php?post="+post+"®ion="+region+"&pyear="+pyear;
xmlhttp.open("GET",link,true);
xmlhttp.send();
}
</script>
<div class="content">
<div class="col-top" >
<div class="container">
<div class="content-top" >
<div class="container">
<div class="page">
<h4 style="font-size: 2.0em;line-height: 1.4em;text-align:center;">Friends Circle </h4>
<p> </p>
<form id="f1" method="post">
<div class="form-group">
<label for="inputEmail3" class="col-sm-1 control-label">Occupation</label>
<div class="col-sm-3">
<select name="post" id="post" class="form-control" onchange="loadalumni(post.value,region.value,pyear.value)">
<?php
$qry = "SELECT DISTINCT occupation FROM `tbluser`";
$res = mysqli_query($con, $qry);
echo "<option value=0>-- All --</option>";
while($row = mysqli_fetch_array($res))
{
echo "<option value=$row[0]>$row[0]</option>";
}
/* ### */ ?>
</select>
</div>
</div>
<div class="form-group">
<label for="inputEmail3" class="col-sm-1 control-label">Region</label>
<div class="col-sm-3">
<select name="region" id="region" class="form-control" onchange="loadalumni(post.value,region.value,pyear.value)">
<?php
$qry = "Select * from tblregion";
$res = mysqli_query($con, $qry);
echo "<option value=0>--All--</option>";
while($row = mysqli_fetch_array($res))
{
if($locid == $row[0])
{
echo "<option value=$row[0] selected>$row[1]</option>";
}
else
{
echo "<option value=$row[0]>$row[1]</option>";
}
}
/* ### */ ?>
</select>
</div>
</div>
<div class="form-group">
<label for="inputEmail3" class="col-sm-1 control-label">Batch</label>
<div class="col-sm-3">
<input type="number" name="pyear" id="pyear" placeholder="Enter Pass Out Year" onchange="loadalumni(post.value,region.value,pyear.value)" min="1"/>
</div>
</div>
<div class=""></div>
</form>
<div class="bs-example" data-example-id="contextual-table" style="border: 1px solid #eee" id="ajaxoffice">
<?php
include("ajaxalumni.php");
/* ### */ ?>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<?php include("chatbox.php"); /* ### */ ?>
<?php
include("footer.php");
/* ### */ ?>