php - $_SESSION variable rewritten -


I have a very strange behavior with session variables of php.

The problem is that the session

For example, the example of the code snippet is something like this:

  & lt ;? Php session_start (); $ _SESSION ["id"] = 5; Echo $ _SESSION ["id"]; // echos5 $ id = $ _REQUEST ["id"]; // $ _REQUEST ["id"] = 3 for example $ _SESSION ["id"]; // Echos 3? & Gt;  

Can it be configured incorrectly?

PS: Running PHP version 5.3.3

You may have < Code> register_globals is set to your php.ini configuration. This means that you can use the $ _ session ['id'] in the context of the variable $ id , which you are looking for in the example above Are there. To close in php.ini, set register_globals and try again.


Comments

Popular posts from this blog

winforms - C# Form - Property Change -

java - Messages from .properties file do not display UTF-8 characters -

javascript - amcharts makechart not working -