Ending a Session in PHP


End a session by clearing session data and destroying the session.

Source Code

session_start();
session_unset(); // remove all session variables
session_destroy(); // destroy the session
echo "Session ended.";
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments