-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgeneratetablecert.php
More file actions
135 lines (111 loc) · 3.77 KB
/
generatetablecert.php
File metadata and controls
135 lines (111 loc) · 3.77 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
<style>
.main {
margin-left: 300px; /* Same width as the sidebar + left position in px */
margin-top:-390px;
font-size: 16px; /* Increased text to enable scrolling */
padding: 0px -200px;
}
.img{
width:75px;
height:75px;
border-radius:100px;
}
.logo{
margin-left:600px
}
</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">
<?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'];
}
?>
<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>
</ul>
<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>
<form action="search.generatetablecert.php" method="post" class="form-inline my-2 my-lg-0"class="navbar-right">
<input type="search" name="id" size="35" placeholder="use firstname 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>
<?php
$conn=mysqli_connect("localhost","root","")or die(mysqli_error());
mysqli_select_db($conn,"health")or die (mysqli_error());
$result = mysqli_query($conn,"SELECT * FROM child") or die (mysqli_error());
echo "<table border='1' class='table table-stripped'>
<tr>
<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>generate pdf</th>
</tr>";
while($row = mysqli_fetch_array($result))
{
echo "<tr>";
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>";
echo "<td><a href='birthcert.php?id=".$row['id']."'>generate</a></td>";
echo "</tr>";
}
echo "</table>";
mysqli_close($conn);
?>
<footer>
<div class="container-fluid padding">
<div class="row text-center">
<div class="col-12">
<hr class="light">
<h5>© timothy.com</h5>
<a href="navi_registra.php" button type="button" class="btn btn-default">Back</button>
</div>
</div>
</div>
</footer>