Here i will explain about logging out of the session.
<?php//session starts heresession_start();//makes sure userid is registeredif(session_is_registered('userid')){//if session is registered only then user can log outsession_unset();}session_destroy();else{//if user is not registered then the logout should not work and redirect user to login pageheader( "Location: http://login.html" );}?>


0 comments until now.
Post a Comment