pianoman993 Posted July 4, 2008 Share Posted July 4, 2008 How secure are session variables? Ff I had a user successfully login and then created $_SESSION['username'] = $username; variable, would this be safe practice? Is it possible that somebody could get into the session variable and change it? This question is especially important for changing passwords where the username should be remembered server-side for quick database reference. Any comments would be appreciated, thanks a bunch. - Mark Quote Link to comment Share on other sites More sharing options...
Daniel0 Posted July 4, 2008 Share Posted July 4, 2008 You should do fine with that. If you store something like the username or user ID in the session then changing the password would not be a problem in respect to remaining logged in. Don't store the password, you wont need it so there is no point in it. However, there are a few aspects you must consider with session security so I would suggest you to read page 7 of my tutorial "PHP Security" which I recently published here. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.