> destroying session in php ~ Online tutorial

destroying session in php

Destroying a Session
If you wish to delete some session data, you can use the unset() or the session_destroy() function.

The unset() function is used to free the specified session variable:

<?php

unset($_SESSION['views']);
?> 
function:
You can also completely destroy the session by calling the session_destroy()


<?php
session_destroy();
?>


Note:
 
session_destroy() will reset your session and you will lose all your stored session data.

Please Give Us Your 1 Minute In Sharing This Post!
Please Give Us Your 1 Minute In Sharing This Post!
SOCIALIZE IT →
FOLLOW US →
SHARE IT →
Powered By: BloggerYard.Com

0 comments: