Archives for the 'PHP' Category
Leaky PHP Session Variables
If you create a session variable, e.g. $_SESSION[”username”], it will conflict with a local variable named $username.
Therefore, the best practice would be to prefix all session variables with a leading underscore, e.g. $_SESSION[”_username”], so that they do not conflict with local variables.
Reference:
http://www.php.net/manual/en/ref.session.php#45534