I am trying to find out whether it is better to store my user data in a session cookie (for example, password, username, etc.) and update this cookie only when I change the MYSQL database from my PHP,
OR
Store the username and user ID in the session cookie and access the MYSQL database every time I need to get the user data.
Which one is the best method.? I have never set up a login system, so any advice would be greatly appreciated.
source
share