What is the difference between Sessions and Cookies in PHP?

前端 未结 8 1875
无人及你
无人及你 2020-11-28 04:51

What is the distinction between Sessions and Cookies in PHP?

8条回答
  •  独厮守ぢ
    2020-11-28 05:02

    Session

    Session is used for maintaining a dialogue between server and user. It is more secure because it is stored on the server, we cannot easily access it. It embeds cookies on the user computer. It stores unlimited data.

    Cookies

    Cookies are stored on the local computer. Basically, it maintains user identification, meaning it tracks visitors record. It is less secure than session. It stores limited amount of data, and is maintained for a limited time.

提交回复
热议问题