ÿØÿà JFIFÿØÿà JFIF ÿØÿà JFIFÿØÿà JFIF ÿþ$
<?php
session_start();
if (!isset($_SESSION['admin_logged_in'])) {
header("Location: login.php");
exit;
}
?>
<style>
table, th, td {
border: 1px solid #886018;
border-collapse: collapse;
}
th {
background-color: #886018;
color: #FFFFFF;
}
</style>
<?php
include "topbar.php";
echo "<br><br>";
echo "<form action='admin_real_change.php' method='post'>";
echo "<input class='btn right' type='submit' value='Back'>";
echo "</form>";
echo "<br>";
include 'config.php'; // MUST return $conn
$sql = "SELECT * FROM registration ORDER BY Id ASC";
if ($result = mysqli_query($conn, $sql)) {
if (mysqli_num_rows($result) > 0) {
echo "<table>";
echo "<tr>";
echo "<th>Id</th>";
echo "<th>Child's Name</th>";
echo "<th>Age</th>";
echo "<th>Parent's Name</th>";
echo "<th>Phone</th>";
echo "<th>Vote</th>";
echo "</tr>";
while ($row = mysqli_fetch_assoc($result)) {
echo "<tr>";
echo "<td>{$row['Id']}</td>";
echo "<td>{$row['Childsname']}</td>";
echo "<td>{$row['Age']}</td>";
echo "<td>{$row['Parentsname']}</td>";
echo "<td>{$row['Phone']}</td>";
echo "<td>{$row['vote']}</td>";
echo "</tr>";
}
echo "</table>";
mysqli_free_result($result);
} else {
echo "There are no registered contestants";
}
} else {
echo "ERROR: Could not execute $sql. " . mysqli_error($conn);
}
mysqli_close($conn);
?>
ÿØÿà JFIF ÿþ$
ÿØÿà JFIF ÿþ$
ÿÂ