Swansea Inbound PPR ADMIN

query($sql); // Check if there are results if ($result->num_rows > 0) { // Start HTML table echo ''; // Output table headers (assuming column names are known) $fields = $result->fetch_fields(); foreach ($fields as $field) { if ($field->name != 'id') { echo ''; } } echo ' '; // Output table rows while ($row = $result->fetch_assoc()) { echo ''; foreach ($row as $key => $value) { if ($key != 'id') { echo ''; } } echo ''; } echo '
' . htmlspecialchars($field->name ?? '') . '
' . htmlspecialchars($value ?? '') . '
'; } else { echo "No results found."; } $conn->close(); ?>