php storing user id in session?

后端 未结 5 1916
说谎
说谎 2020-12-17 14:48

I am wondering what the risks are of storing the userid in a session?

then simply doing a

if(isset($_SESSION[\'user_id\'])){
  login_user($_SESSION[         


        
5条回答
  •  不思量自难忘°
    2020-12-17 15:39

    Most applications use $_SESSION as you are. If there where a wide spread weakness then major projects would be doing things differently.

提交回复
热议问题