note 39160 added to function.session-id

From: Date: Mon, 19 Jan 2004 10:53:55 +0000
Subject: note 39160 added to function.session-id
Groups: php.notes 
Request: Send a blank email to php-notes+get-63821@lists.php.net to get a copy of this message
Is there a way to stop the session id from getting passed? I have a website where users can log in to access certain features after logging in. I use sessions to track those users, but I don't want to burden non-logged in visitors with cookies, much less obfuscate their URLs. I tried the code below, but it didn't do what I want: if(!session_id()) { session_start(); } if(isset($_SESSION['user'])) { $user = $_SESSION['user']; } else { session_destroy(); session_id(FALSE); } The session id is still passed, even though it is supposedly set to FALSE and the session destroyed if no user variable was registered. Any help appreciated. ---- Manual Page -- http://www.php.net/manual/en/function.session-id.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+39160 Delete -- http://master.php.net/manage/user-notes.php?action=delete+39160&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+39160&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#63821) next »