After a long hiatus from PHP I have decided to make a personal site. Was working on some authorization code and just wanted to verify that what I am doing is safe.
Currently I am setting a couple session variables, one of which is a 'userlevel' which will be used to check if user has proper access. Usually I would always just go back to the db and grab this value but figured if its safe and to reduce db strain I would make it a session value. I have a little system setup that would go back and verify all session variables against the db after a certain time or number of page loads but I thought this might save some cycles.
Should I get rid of this idea or is it safe?
thanks.