Home>

How do I prevent the user from logging in every time in the chat in PHP? Something like localstorage in JS. So that a person registers and the chat remembers him, so that in the future, when entering the chat, the user does not enter a new one every time.

Please correct the question to reflect the specific problem with enough detail to be able to provide an adequate answer.

Дух сообщества2022-01-12 17:01:01
  • Answer # 1

    in PHP you can look towards $ _SESSION or $ _COOKIE. After the user is authorized, save his identifier in the session, and then check if the user is authorized.

    Thank you very much)

    Верный Дрёва2022-01-12 17:15:06
  • Answer # 2

    in PHP you can look towards $ _SESSION or $ _COOKIE. After the user is authorized, save his identifier in the session, and then check if the user is authorized.

    Thank you very much)

    Верный Дрёва2022-01-12 17:15:06