Why does this code work only after the 2nd page reload? Cooke is created after the first page load, but if the block for some reason does not see the cookie during the first page load. How can this be fixed? Use session is not possible. Ps: this is a simplified version of my code with the same prince of work.
setcookie("test", "tsst", time()+10, "/"); if (isset($_COOKIE['test'])) { echo "ok"; }