Forum Moderators: phranque
Using sessions is safer in my opinion, storing the permission level as a session variable (I'm assuming there is a login and some kind of user database with permission level assigned to each user).
hope that helps
mavherick
So the only thing in your cookie would be a unique id and you use that to retrieve the info associated to it, like your permission level variable for example.
sorry, i guess i wasn't to clear.
mavherick
from php.net
Generates a storable representation of a value
then you unserialize [php.net] it to read it.
I get the point on the id thingy. That's just what I'm doing. The id is stored for 6mts but when a user logs in, the other stuff I need such as user name, email and perms level will be pulled and put into 1hr cookies.
I don't want folks to have to re-enter passwords everytime they want to edit/contribute...
Thanks for all your help ;)
Nick
Jus' wondering what degree of paranoia we are operating on here ;) I guess there is a consensus that any data from cookies cant be deemed reliable, nonetheless im sure someone would correct me if im wrong.
If no one but you knows why these permissions are set it seems OK that no one would be able to crack them....
maybe use a few variables as a "salt" or something....that 0-5 stuff sounds risky....more so depending on your php setup...