So how do you use PHP to delete the username and password in the database by logging out?
嘉俊2018-05-04 14:34:26
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.
进击的蜗牛2018-05-01 11:54:37
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.
Daniel2018-04-28 08:52:22
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.