Original Post
I am making a PHP browser-based game, and have a question: I am needing to track quite a few pieces of data about a logged in player, and I need to know whether it is better to just hold them all in session variables from page-to-page, or should I only hold the player name and then re-query for the rest of the player's data per page. I would assume it should be the former, but a few example games I have downloaded have used the second method, and I am not sure why. Are there any problems or security issues with session variables? I know that only the session ID is stored client-side through a cookie, so there shouldn't be any issue with players being able to alter them, right? I would love to avoid all those extra MySQL queries for each player per page if possible. Thanks!