query("SHOW TABLES LIKE 'user_settings'"); if ($table_check && $table_check->num_rows > 0) { // Save to database $sql = "INSERT INTO user_settings (user_id, theme_color, font_size, updated_at) VALUES (?, ?, ?, NOW()) ON DUPLICATE KEY UPDATE theme_color = VALUES(theme_color), font_size = VALUES(font_size), updated_at = NOW()"; $stmt = $conn->prepare($sql); $stmt->bind_param("iss", $_SESSION['user_id'], $theme_color, $font_size); $stmt->execute(); } } catch (Exception $e) { // Just save to session if DB fails } $success = "Theme settings saved successfully!"; } $page_title = 'Theme Settings'; require_once __DIR__ . '/includes/header.php'; ?>

🎨 Theme Settings

Customize Your Experience

Choose the primary color for buttons, links, and accents

'Teal (Default)', 'value' => '#17a2b8'], ['name' => 'Blue', 'value' => '#007bff'], ['name' => 'Green', 'value' => '#28a745'], ['name' => 'Purple', 'value' => '#6f42c1'], ['name' => 'Orange', 'value' => '#fd7e14'], ['name' => 'Red', 'value' => '#dc3545'], ['name' => 'Pink', 'value' => '#e83e8c'], ['name' => 'Dark Blue', 'value' => '#343a40'], ]; foreach ($colors as $color): ?>
Or choose custom color

Adjust the text size for better readability

'small', 'label' => 'Small', 'size' => '14px'], ['value' => 'medium', 'label' => 'Medium', 'size' => '16px'], ['value' => 'large', 'label' => 'Large', 'size' => '18px'], ['value' => 'xlarge', 'label' => 'Extra Large', 'size' => '20px'], ]; foreach ($sizes as $size): ?>

Sample Heading

This is how your text will look with the selected settings. Buttons and links will use the theme color you've chosen.

💡 Tips