-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtableParish.php
41 lines (35 loc) · 1.01 KB
/
tableParish.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
<?php
// keep these here for testing
// mysqli_report(MYSQLI_REPORT_ALL);
// error_reporting(E_ALL); // report all PHP errors
// ini_set("display_errors", 1); // display them
session_start();
include "style_head.php";
?>
<title>Parish</title>
<h2 class="pull-left">Parish Details</h2>
</div>
<div class="footer">
<a href="logout.php" id="b1" class="btn btn-outline-success btn-sm ml-3">Sign Out</a>
</div>
<?php
include "config.php";
$sql = "SELECT * FROM parish";
$result = $conn->query($sql);
if($result->num_rows > 0){
echo '<table class="table table-bordered table-striped">';
echo "<tr>";
echo "<th>Parish_ID</th>";
echo "<th>Parish_Name</th>";
echo "<th>Office_ID</th>";
echo "</tr>";
}
while ($row = $result -> fetch_assoc()){
echo '<tr>
<td> '.$row['Parish_ID'].' </td>
<td> '.$row['Parish_Name'].' </td>
<td> '.$row['Office_ID'].' </td>
</tr>';
}
echo "</table>";
?>