Destroy session data and files

Views: 42 Last modified: August 03rd, 2011 Comments: 0

This function destroys and unset all the related variables registered to a session.

<?php
function DestroySession()
{
	// If session_start has been entered
	if ( isset( $_SESSION ) )
	{
		// Unset session
		@session_unset();

		// Destroy session data/files
		@session_destroy();
	}
}
?>
VN:F [1.9.13_1145]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.13_1145]
Rating: 0 (from 0 votes)

    Mail this!

    To: From:Sum {3+8} =  
    Anything to add ?

        You must be logged in to post a comment.