<?php
session_start();

if (isset($_POST['sfp_enabled'])) {
    $_SESSION['sfp_enabled'] = filter_var($_POST['sfp_enabled'], FILTER_VALIDATE_BOOLEAN);
    echo json_encode(['status' => 'success', 'sfp_enabled' => $_SESSION['sfp_enabled']]);
} else {
    echo json_encode(['status' => 'error', 'message' => 'Invalid request']);
}
?>
