note 84074 added to function.setcookie

From: Date: Thu, 26 Jun 2008 15:25:05 +0000
Subject: note 84074 added to function.setcookie
Groups: php.notes 
Request: Send a blank email to php-notes+get-140837@lists.php.net to get a copy of this message
Note for Opera (and maybe FF) users - if you're having trouble deleting the PHPSESSID cookie, ensure you set the path when deleting, or Opera will ignore and send the cookie with all future requests in that session, for example: session_start() // creates a cookie using "Set-Cookie: PHPSESSID=b45c661720e0b3d27954a7d0225b1156; path=/" Then to delete... session_start(); $_SESSION = array(); // destroy all $_SESSION data setcookie(session_name(), "", time() - 3600, "/"); session_destroy(); Note the last parameter on setcookie() to set the path, Opera requires this. ---- Server IP: 87.124.64.96 Probable Submitter: 87.85.166.34 ---- Manual Page -- http://www.php.net/manual/en/function.setcookie.php Edit -- https://master.php.net/note/edit/84074 Del: integrated -- https://master.php.net/note/delete/84074/integrated Del: useless -- https://master.php.net/note/delete/84074/useless Del: bad code -- https://master.php.net/note/delete/84074/bad+code Del: spam -- https://master.php.net/note/delete/84074/spam Del: non-english -- https://master.php.net/note/delete/84074/non-english Del: in docs -- https://master.php.net/note/delete/84074/in+docs Del: other reasons-- https://master.php.net/note/delete/84074 Reject -- https://master.php.net/note/reject/84074 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#140837) next »