how to logout from a php session - session_destroy doesn't seem to be enough

后端 未结 6 784
囚心锁ツ
囚心锁ツ 2021-01-15 19:01

I\'m trying to learn PHP and using sessions. I seen examples about using session_destroy on logout, but I see this in the php documentation:

In order

6条回答
  •  Happy的楠姐
    2021-01-15 19:11

    In my opinion only this is nesessary

    session_start();
    unset($_SESSION["nome"]);  // where $_SESSION["nome"] is your own variable. if you do not have one use only this as follow **session_unset();**
    

提交回复
热议问题