I like using session variables to track various and sundry as users navigate through my sites.
The problem comes when I forget to change, or load a session variable.
What I used to do was add var_dump($_SESSION) lines to my scripts…but of course, then you have to go remove them.
This weekend I thought of a cleaner way.
I create a whole new file, usually sessvar.php. I then point my browser to it, and whenever I need to see what the session variables are, I simply refresh the page.
So, you’d navigate to yourpageurl/sessvar.php in a tab besides what ever you’re using to check your work, and refresh the sessvar.php page whenever you needed to see what variables your stored were.
<?php session_start(); var_dump($_SESSION); ?>