Learn, grow and help others with BBBootstrap
Contribute us with some awesome cool snippets using HTML,CSS,JAVASCRIPT and BOOTSTRAP

<?php
include "../config/db.php"; // Include database connection
// Fetch all records from tbl_information
$result = $conn->query("SELECT * FROM tbl_informasaun");
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>View Information</title>
<link rel="stylesheet" href="../css/style.css">
</head>
<body>
<h1>School Information</h1>
<a href="../index.php">Home</a> |
<a href="../admin/dashboard.php">Admin Dashboard</a>
<br><br>
<table border="1">
<tr>
<th>ID</th>
<th>Name</th>
<th>Address</th>
<th>Description</th>
<th>Actions</th>
</tr>
<?php while ($row = $result->fetch_assoc()): ?>
<tr>
<td><?php echo htmlspecialchars($row['id']); ?></td>
<td><?php echo htmlspecialchars($row['name']); ?></td>
<td><?php echo htmlspecialchars($row['address']); ?></td>
<td><?php echo htmlspecialchars($row['description']); ?></td>
<td>
<a href="view_info_detail.php?id=<?php echo $row['id']; ?>">View</a> |
<a href="update_info.php?id=<?php echo $row['id']; ?>">Edit</a> |
<a href="delete_info.php?id=<?php echo $row['id']; ?>" onclick="return confirm('Are you sure?')">Delete</a>
</td>
</tr>
<?php endwhile; ?>
</table>
<br>
<a href="add_info.php">Add New Information</a>
</body>
</html>