-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsearch.list.php
More file actions
231 lines (179 loc) · 6.28 KB
/
search.list.php
File metadata and controls
231 lines (179 loc) · 6.28 KB
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
<html>
<style>
#ser{
margin-left:350px;
}
.logo {
margin-left:600px;
}
.img{
width:75px;
height:75px;
border-radius:100px
}
</style>
<script src="dashboard/js/tinymce/tinymce.min.js"></script>
<script src="dashboard/js/tinymce/script.js"></script>
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="css/cms-home.css">
<link rel="stylesheet" type="text/css" href="css/material-icons.css">
<link rel="stylesheet" type="text/css" href="css/style.css" media="all" />
<link rel="stylesheet" type="text/css" href="css/demo.css" media="all" />
<link rel="stylesheet" type="text/css" href="css/jquery-ui.css">
<link rel="stylesheet" href="css/loginstyle.css">
<link href="dashboard/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<a class="navbar-brand" href="navi_registra.php"><img src="img/kenya.png" width="30%">Ministry of Health</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarResponsive">
<span class="navbar-toggler-icon"></span>
</button>
<!-- Links -->
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link" href="healthhomepage.php">Menu</a>
</li>
<li class="nav-item">
<a class="nav-link" href="login.php">Login</a>
</li>
<!-- Dropdown -->
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbardrop" data-toggle="dropdown">
Dropdown link
</a>
<div class="dropdown-menu">
<a class="dropdown-item" href="#">Link 1</a>
<a class="dropdown-item" href="#">Link 2</a>
<a class="dropdown-item" href="#">Link 3</a>
</div>
</li>
</ul>
<?php
include ('loginvalidation.php');
$conn=mysqli_connect('localhost','root','');
mysqli_select_db($conn, 'health');
$query=mysqli_query($conn, "select * from registra where id='".$_SESSION['ad']."'")or die(mysqli_error());
while($deal=mysqli_fetch_array($query)){
$fn= $deal['firstname'];
$surname= $deal['secondname'];
$image= $deal['image'];
$reg=$deal['Registration_no'];
}
?>
<div class="logo">
<img src ="<?php echo $image;?>" class="img"><br>
<?php
echo $fn." ". $surname;echo "<br>";
echo $reg; echo"<br>";
echo '<a href="signout.php">Sign out</a>';
?>
</div>
</nav>
<div class=form-group">
<form action="" method="post" class="form-inline my-2 my-lg-0"class="navbar-right">
<input type="search" name="id" size="35" placeholder="use id to search" ariel-label="search"><br></br>
<br><button class="btn btn-outline-success my-2 my-sm-0" type="submit" name="search">Search</button></br>
</form>
</div>
<html>
<h1 style="font-size:30;color:#00FF00;"></h1>
<head>
<style>
table
{
border-style:solid;
border-width:2px;
border-color:pink;
}
</style>
<script src="dashboard/js/tinymce/tinymce.min.js"></script>
<script src="dashboard/js/tinymce/script.js"></script>
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="css/cms-home.css">
<link rel="stylesheet" type="text/css" href="css/material-icons.css">
<link rel="stylesheet" type="text/css" href="css/style.css" media="all" />
<link rel="stylesheet" type="text/css" href="css/demo.css" media="all" />
<link rel="stylesheet" type="text/css" href="css/jquery-ui.css">
<link rel="stylesheet" href="css/loginstyle.css">
<link href="dashboard/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
<?php
if(isset($_POST['search'])){
$conn=mysqli_connect("localhost","root","") or die(mysql_error());
$db=mysqli_select_db( $conn,"health") or die(mysql_error());
$id=$_POST['id'];
$result = mysqli_query($conn, "SELECT * FROM child join mother on child.id = mother.id join father on child.id = father.id where child.id='$id'");
echo "<table border='1' class='table'>
<tr>
<th>id</th>
<th>serial no</th>
<th>First name</th>
<th>othername</th>
<th>surname</th>
<th>dob</th>
<th>sex</th>
<th>type of birth</th>
<th>nature of birth</th>
<th>place of birth</th>
<th>district</th>
<th>Mother-firstname</th>
<th>M-middlename</th>
<th>M-surname</th>
<th>M-Age</th>
<th>M-married</th>
<th>M-sub location</th>
<th>M-District</th>
<th>M-born alive</th>
<th>M-born dead</th>
<th>Father-firstname</th>
<th>F-othername</th>
<th>F-surname</th>
</tr>";
$row=mysqli_num_rows($result);
if($row==1){
while($row = mysqli_fetch_array($result))
{
echo "<tr>";
//<!------childs details------>
echo "<td>" . $row['id'] . "</td>";
echo "<td>" . $row['serial_no'] . "</td>";
echo "<td>" . $row['Firstname'] . "</td>";
echo "<td>" . $row['Othername'] . "</td>";
echo "<td>" . $row['Surname'] . "</td>";
echo "<td>" . $row['Date_of_birth'] . "</td>";
echo "<td>" . $row['sex'] . "</td>";
echo "<td>" . $row['Type_of_birth'] . "</td>";
echo "<td>" . $row['Nature_of_birth'] . "</td>";
echo "<td>" . $row['place_of_birth'] . "</td>";
echo "<td>" . $row['District'] . "</td>";
//<--mothers details-->
echo "<td>" . $row['Firstname'] . "</td>";
echo "<td>" . $row['Middlename'] . "</td>";
echo "<td>" . $row['Surname'] . "</td>";
echo "<td>" . $row['Age'] . "</td>";
echo "<td>" . $row['married'] . "</td>";
echo "<td>" . $row['Sub_location'] . "</td>";
echo "<td>" . $row['District'] . "</td>";
echo "<td>" . $row['bornalive'] . "</td>";
echo "<td>" . $row['borndead'] . "</td>";
//<---fathers details-->
echo "<td>" . $row['Firstname'] . "</td>";
echo "<td>" . $row['othername'] . "</td>";
echo "<td>" . $row['surname'] . "</td>";
echo "</tr>";
}
}else{
echo '<script> window.alert("no records found")</script>';
}}
echo "</table>";
?>
</html>
<footer>
<div class="container-fluid padding">
<div class="row text-center">
<div class="col-12">
<hr class="light">
<h5>© timothy.com</h5>
<a href="listchildmotherfatherinformant.php" button type="button" class="btn btn-default">Back</button>
</div>
</div>
</div>
</footer>