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" );}?>


2 comments until now.
very informative post for me as I am always looking for new content that can help me and my knowledge grow better.
Amazing blog and very interesting stuff you got here! I definitely learned a lot from reading through some of your earlier posts as well and decided to drop a comment on this one!
Post a Comment