Good evening, I need the cookies to be preserved until the session is closed, for this I thought, if you do not set the parameters, then the cookie will be set before the session is closed, yes, or are there other options? It's not safe?

  • I do not understand why all the time change the text? What's the point? - bemulima 4:04

1 answer 1

If cookies do not set the storage time, they are stored until the browser is closed

  • Photon, if before each session start you can just session_set_cookie_params (), will it work? - bemulima
  • According to the logic of things at any hoster, and indeed by default at php, the lifetime of session cookies is until the browser is closed. Ordinary cookies (if no lifetime is set) - also before the browser closes - Photon
  • Photon, exactly, works) - bemulima