I just noticed a boo boo when programming with PHP 4.1.0 or higher and using the new "super globals". Session variables (and cookie variables, but I use those less) seem to benefit the most from having an explicit $_SESSION in front of it to signify that it's coming from a session. It's not as clear otherwise.
My mistake, though, was that I used $_SESSION["varname"] and $varname as a post variable, thinking that they were different variables, when in reality, since REGISTER_GLOBALS is on, the fact that I had a session variable named $varname cancelled out the auto-registered session variable (EGPCS - session comes last), so $varname and $_SESSION["varname"] actually referred to the exact same variable
Just something else to watch out for. I was able to get around it by just using the $_REQUEST["varname"] version, since that will refer to the post or get version instead of the session version.
Feel free to post a comment below. Please see my comment policy.
Formatting Rules (No HTML):