<?php
// Check if style is changed
$style = isset($_POST['style'])
    ? $_POST['style']
    : null;

if ($style !== null) {
    echo "Updated the session with '" . htmlentities($style) . "' Reload to se the change.";
    $_SESSION['stylesheet'] = $style;
}
?>
<p>Using POST with the form.</p>

<p>Value of the current stylesheet key = '<?=$key?>'.</p>

<form method="post" action="?page=post-dropdown">
    <label>Select the stylesheet.<br>
        <?php include("content/incl/stylechooser.php"); ?>
    </label>
</form>
