How to use sessions and cookies in php?

I mean, to avoid any injections and optimally, what is the lifespan of the set?
June 3rd 19 at 20:20
2 answers
June 3rd 19 at 20:22

Lessons old, but if a beginner, understanding and application will come with time))

The difference cook and session -
June 3rd 19 at 20:24
It's simple - cookies don't need to use it. On the webstorage client on the server session. All.

Find more questions by tags PHPHTTP CookiesSessions