'Missing key']); try { $pdo->prepare("UPDATE config SET value = ? WHERE key = ?")->execute([$value, $key]); json_response(['message' => "Updated $key"]); } catch (PDOException $e) { json_response(['error' => $e->getMessage()]); } } $rows = $pdo->query("SELECT key, value FROM config ORDER BY key")->fetchAll(); json_response(['config' => $rows]);