简体   繁体   中英

What is the correct flow for login-logout members system using Cookies + PHP sessions

I was wondering what should be the flow when creating a members login-logout system which uses both sessions & cookies.
I've been thinking about the following flow :

  1. Login - create both cookie and session params
  2. Each page, check for session params for login, if didn't find, go to cookie to get login params
  3. Logout - delete both cookie & sessions params.

Is this the correct usage of cookies & sessions ?

Thank you

相信您通过这种方式使用它们是正确的,例如,我不仅使用会话cookie。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM