<?php
require_once 'config/database.php';

try {
    // Use the existing $pdo connection from database.php
    $stmt = $pdo->prepare("INSERT INTO site_settings (`key`, `value`) VALUES (?, ?) ON DUPLICATE KEY UPDATE `value` = VALUES(`value`)");
    $stmt->execute(['id_card_background', 'default_bg.jpg']);
    echo "Default background set successfully";
} catch (Exception $e) {
    echo "Error: " . $e->getMessage();
}
?>