<?php
if ($_SERVER["REQUEST_METHOD"] === "POST") {
    setcookie("color", $_POST["color"], time() + 3600);
    header("Location: code_44_02.php");
    exit;
}
?>
<body style="background-color: <?= $_COOKIE["color"] ?? "white" ?>">
    <form method="post">
        <label>Wybierz kolor tła:</label>
        <input type="color" name="color">
        <button type="submit">Zapisz</button>
    </form>
</body>