How to write user logout?
skyblue°天空
skyblue°天空 2018-04-27 20:50:46
0
4
1657

So how do you use PHP to delete the username and password in the database by logging out?

skyblue°天空
skyblue°天空

reply all(4)
嘉俊

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

Daniel

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.
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template