-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsearch.php
90 lines (75 loc) · 2.25 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
<?php
include_once('private/conn.php');
?>
<html>
<head>
<title></title>
<script type="text/javascript" src="jquery.min.js"></script>
<!-- Bootstrap Core CSS -->
<link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<!-- MetisMenu CSS -->
<link href="vendor/metisMenu/metisMenu.min.css" rel="stylesheet">
<!-- Custom CSS -->
<link href="dist/css/sb-admin-2.css" rel="stylesheet">
<!-- Morris Charts CSS -->
<link href="vendor/morrisjs/morris.css" rel="stylesheet">
<!-- Custom Fonts -->
<link href="vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
<script type="text/javascript">
$(document).ready(function()
{
$("#loding1").hide();
$("#loding2").hide();
$(".ministry").change(function()
{
$("#loding1").show();
var id=$(this).val();
var dataString = 'id='+ id;
$(".people").find('option').remove();
$.ajax
({
type: "POST",
url: "get_people.php",
data: dataString,
cache: false,
success: function(html)
{
$("#loding1").hide();
$(".people").html(html);
}
});
});
});
</script>
</head>
<body>
<div>
<div id="main-container">
<label>Search Ministry:</label>
<select name="ministry" class="ministry">
<option selected="selected">--Select wing--</option>
<?php
$stmt = $db->get_results("SELECT office_name FROM ministryoffice");
echo $stmt;
foreach($stmt as $row)
{
?>
<option value="<?php echo $row->office_name; ?>"><?php echo $row->office_name; ?></option>
<?php
}
?>
</select>
<label>People:</label>
<select name="people" class="people">
<option selected="selected">--Select--</option>
</select>
<img src="ajax-loader.gif" id="loding1"></img>
<input type = "submit" value = "Go"/>
</div>
<div class="row">
<div class="col-lg-4" style="border: 2px solid red">.col-sm-4</div>
<div class="col-lg-8" style="border: 2px solid red">.col-sm-8</div>
</div>
</div>
</body>
</html>