One is to log out by clicking the exit button on the user login page; //Directly use unset($_SESSION['user']), session_destroy();
The other is for the administrator to log out in the background Disable a user from logging in; //Modify the value of the data table field, such as status => 0, 0 means disabled, and the default is 1.
The last one is for the administrator to directly delete a user's information. //Just use delete from.
When logging out of a user, there is no need to delete the user information in the database. It is OK to just clear the user information saved in the session (generally) when logging in.
The user name and information entered by the user are compared with the database. After success, they can be stored in the session super global variable and session_destroy()
What does the so-called user logout mean?
One is to log out by clicking the exit button on the user login page; //Directly use unset($_SESSION['user']), session_destroy();
The other is for the administrator to log out in the background Disable a user from logging in; //Modify the value of the data table field, such as status => 0, 0 means disabled, and the default is 1.
The last one is for the administrator to directly delete a user's information. //Just use delete from.
I hope I can help you.
When logging out of a user, there is no need to delete the user information in the database. It is OK to just clear the user information saved in the session (generally) when logging in.
Destroy$_SESSION
The user name and information entered by the user are compared with the database. After success, they can be stored in the session super global variable and session_destroy()
when logging out.