Debugging a PHP program, is there any add-on/plug-in for browser which I can view sessions variables (those PHP $_SESSION["foobar"] )?
Best if I can change the value in the variables.
Debugging a PHP program, is there any add-on/plug-in for browser which I can view sessions variables (those PHP $_SESSION["foobar"] )?
Best if I can change the value in the variables.
That's one of the main reasons you'd use a session over a cookie - YOU control the data. With cookies, the user can manipulate the data.
The only way to access/manipulate session data from the client side would be with an Ajax call or other JavaScript mechanism to call another php script, which would be doing the retrieval/manipulation of the session data via the session_
functions.
$_SESSION is server side variables. if we can read or change the value there are many things that we can do to hack or bad thing. however if there are phpinfo(); called we can read session variable but cannot change the value.
if we are developer for the app, we can debug all session variable with
print_r($_SESSION);
some usefull command
session_start(); // start session
session_destroy(); // unset all session variable
Session is an array so if you set $_SESSION['key']='value';
it is same like $array['key]='value;