I have an index.php file here:
<?php session_start(); var_dump($_SESSION['modals']); $_SESSION['modals'] = ; ?>
and a redirect.php file here:
<?php session_start(); $_SESSION['modals'] = ['title' => "test", 'msg' => "message to show"]; header('Location: index.php', true, 301); exit(); ?>
As you see, these are realy basic.
The problem I encounter is that if I load the page redirect.php 2 or 3 times in row, it simply show one entry in the $_SESSION['modals'] variable, as it should. But if I load the redirect.php page several times in row, usualy 4 or more, it start buging. The $_SESSION['modals'] sometimes contain 2 entries, and sometimes 1.
I don't understand why??
Thanks in advance for your responses!