Login system with sessoes

Asked

Viewed 82 times

-2

IN A PHP LOGIN SYSTEM WHICH VARIABLES SHOULD I STORE IN SESSIONS? email and password or only the user id?

1 answer

0

The coreto is to store the email/username and id, or just the "id" since with the "id" you can get other user data. It’s not a good idea to store a password in the session, 1 for security reasons, 2 because you won’t need a password to perform other operations besides login.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.