DUE
TYPE
CREDITS (30)
STANDARD
PRIORITY
0) {
while($row = mysqli_fetch_assoc($result)) {
// Converte a matéria para letras minúsculas para encaixar no seu CSS (.math-bg, .eng-bg, etc.)
$bg_class = strtolower($row['subject']) . "-bg";
// Formata a data vinda do MySQL (YYYY-MM-DD) para exibir DD/MM
$date_clean = date("d/m", strtotime($row['due_date']));
// Define a classe de prioridade (.high-pr, .medium-pr)
$priority_class = strtolower($row['priority']) . "-pr";
echo '
';
echo '
';
}
} else {
echo '' . strtoupper($row['subject']) . '
';
echo ' ' . htmlspecialchars($row['title']) . '
';
echo ' ' . $date_clean . '
';
echo ' ' . strtoupper($row['type']) . '
';
echo ' ' . htmlspecialchars($row['credits']) . '
';
echo ' ' . htmlspecialchars($row['standard_code']) . '
';
echo ' ' . strtoupper($row['priority']) . '
';
echo 'No records found in your database.
'; } mysqli_close($conn); ?>