0

Alright so this explanation might be a little... wonky?

So to break it down imagine this scenario

I add information to the $_SESSION using a button on Page A this all goes fine. I click to go to Page B, everything is still fine and the $_SESSION values are all there. But when I go back to the previous Page A using the browsers back button my added value is not there for some reason.

I am trying to find out why this happens and if I can prevent it from happening, because if I reload the page again with F5 the information is there no problems whatsoever.

Thanks already.

  • Normal behavior, back button reloads previous cache instead of sending HTTP request – Cid Nov 23 '20 at 19:43
  • Does this answer your question? [prevent browser back button cache](https://stackoverflow.com/questions/31735428/prevent-browser-back-button-cache) – Cid Nov 23 '20 at 19:44
  • Affraid that doesnt work for some reason, yet to figure out why – Code Cannibal Nov 23 '20 at 19:50
  • Please read over [how to ask](https://stackoverflow.com/help/how-to-ask) and edit your question with more details (i.e. show us some code!). As this is written, it is not a minimal reproducible example, so getting a quality answer is unlikely. – WOUNDEDStevenJones Nov 23 '20 at 20:14

1 Answers1

0

You should start session in each of your PHP pages ;

session_start();
Ouma Nyang
  • 31
  • 5