Jump to content

The sessions on https://www.w3schools.com/php/php_sessions.asp are suddenly not working on Chrome, Firefox and Opera?


ThomasDueNielsen

Recommended Posts

The code looks correct and it is working properly in Firefox on my device.

I first opened this page to write values to the session:

https://tryphp.w3schools.com/showphp.php?filename=demo_session1

Then I opened this page and can see the correct values:

https://tryphp.w3schools.com/showphp.php?filename=demo_session2

If the problem is happening with the code on your web server then show your code here and maybe I can find out why it's not working.

Link to comment
Share on other sites

There are only two possible scenarios where the variables are not displayed on that page:

  1. You haven't yet visited the page that gives the variables a value.
  2. Your browser is blocking the session cookie.

If you use private mode in your browsers, that might be the reason that cookies are being blocked.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...