When having user login to the site I need to somehow store the logged in user id so that my site can generate different content for different users.
Is it secure to save a user's id in a $_SESSION[]
variable?
Is it possible for a user to change the $_SESSION[]
data and pretend to be another user?
I use the id to check which data I should fetch from the database and to see which permissions the user has.