I have read many php tutorials for logout scripts, i am wondering what could be the proper way to logout from a session!
Script 1
Session_unset(); only destroys the session variables. To end the session there is another function called session_destroy(); which also destroys the session .
update :
In order to kill the session altogether, like to log the user out, the session id must also be unset. If a cookie is used to propagate the session id (default behavior), then the session cookie must be deleted. setcookie() may be used for that