Sessions or Cookies for login system?

1

I'm doing a login system in PHP and would like to know which option is safer: Cookies or Sessions. I know many developers do not like using cookies because they can be removed by users. But my question is in the security question, which one is more secure?

    
asked by anonymous 05.10.2016 / 22:39

1 answer

2

Still, use sessions, cookies and can be removed by users, can be read by some malware that the user has on the PC. The only correct way to use cookies is just to save the session ID to retrieve the user's session, and even then the session ID must be encrypted in some way.

    
05.10.2016 / 22:44