note 109433 added to function.session-unset

From: Date: Tue, 17 Jul 2012 02:06:56 +0000
Subject: note 109433 added to function.session-unset
Groups: php.notes 
Request: Send a blank email to php-notes+get-189253@lists.php.net to get a copy of this message
i always do like this to logout: <?php session_start(); session_destroy(); ?> worked 100% with me, on ie, opera (windows, puppy linux 4.3.1, ubuntu and android), firefox, chrome, dolphin hd (android) and even android 2.1 default web browser! you can try to check the content and destroy it like this: <?php session_start(); session_destroy(); if(count($_SESSION) == 0) { $_SESSION=array(); session_destroy(); } ?> remember: allways put this in the very beginning of the html code or other php scripts... if you put under <html> tag, you gonna have a bad time... ---- Server IP: 69.147.83.197 Probable Submitter: 85.240.220.237 ---- Manual Page -- http://www.php.net/manual/en/function.session-unset.php Edit -- https://master.php.net/note/edit/109433 Del: integrated -- https://master.php.net/note/delete/109433/integrated Del: useless -- https://master.php.net/note/delete/109433/useless Del: bad code -- https://master.php.net/note/delete/109433/bad+code Del: spam -- https://master.php.net/note/delete/109433/spam Del: non-english -- https://master.php.net/note/delete/109433/non-english Del: in docs -- https://master.php.net/note/delete/109433/in+docs Del: other reasons-- https://master.php.net/note/delete/109433 Reject -- https://master.php.net/note/reject/109433 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#189253) next »