School Settings
Working Days
Select the days your school operates. This will affect timetable generation.
prepare("UPDATE schools SET working_days = ? WHERE id = ?"); if ($stmt->execute([$working_days, $school_id])) { $message = 'Settings updated successfully!'; } else { $error = 'Failed to update settings.'; } } catch (PDOException $e) { $error = 'Database error: ' . $e->getMessage(); } } } // Fetch school settings $school_settings = null; try { $stmt = $pdo->prepare("SELECT * FROM schools WHERE id = ?"); $stmt->execute([$school_id]); $school_settings = $stmt->fetch(PDO::FETCH_ASSOC); } catch (PDOException $e) { $error = 'Database error: ' . $e->getMessage(); } $current_working_days = $school_settings ? explode(',', $school_settings['working_days']) : []; $all_days = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday']; ?>
Select the days your school operates. This will affect timetable generation.