PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I'm expecting to destory any data contained within $_SESSION["username"], failing that I was expecting the value of $_SESSION["username"] to change to anything that wasn't its inital assiged value.
SELECT * FROM somewhere WHERE customerid = '$_SESSION["username"]'
My sites coded so that these queries will still run if a user isn't logged it but no data will be retrieved because the session variable will be empty.
It may be a good idea to take note of the .. note on the session_unset() page.
Note: If $_SESSION (or $HTTP_SESSION_VARS for PHP 4.0.6 or less) is used, use unset() to unregister a session variable, i.e. unset ($_SESSION['varname']);.
The session variable is set inside of a login function and then is unset outside of that function. I didn't think this would cause a problem due to session being a global, do you agree?