php - Prevent Cookies from being edited -
php - Prevent Cookies from being edited -
there many ways users can edit content of cookies. on website, have cookie called "user" stores username user logged in with. however, noticed cookie can edited log in account. there code or parameter can add together setcookie() function, blocks users doing editing cookie?
no, cookie stored on client's machine , client has access it. suggest storing hash instead of user's business relationship name. take hash cookie , retrieve username info storage, if hash has been manipulated won't proper username , know need them log in 1 time again , create valid hash in cookie.
php cookies
Comments
Post a Comment