note 90901 added to session.constants

From: Date: Fri, 15 May 2009 11:57:12 +0000
Subject: note 90901 added to session.constants
Groups: php.notes 
Request: Send a blank email to php-notes+get-154629@lists.php.net to get a copy of this message
I think the previous comment is misleading. I think one should use SID as follows: Either you leave trans_sid to on, and then you shouldn't add ANY session id to ANY of your page links, as it would be done by PHP itself, or You turn off trans_sid and make each and every link on your page look like this: index.php?<?=SID;?> This is because if php receives the session cookie, it knows that no session info should be added on the urls, and makes the SID constant evaluate to an empty string (and, even if trans_sid is on, it doesn't add sid info automatically); instead, if no session cookie arrives, either the inclusion of <?=SID;?> or the activation of trans_sid takes care of adding the necessary session info to the urls. ---- Server IP: 69.147.83.197 Probable Submitter: 93.42.33.80 ---- Manual Page -- http://www.php.net/manual/en/session.constants.php Edit -- https://master.php.net/note/edit/90901 Del: integrated -- https://master.php.net/note/delete/90901/integrated Del: useless -- https://master.php.net/note/delete/90901/useless Del: bad code -- https://master.php.net/note/delete/90901/bad+code Del: spam -- https://master.php.net/note/delete/90901/spam Del: non-english -- https://master.php.net/note/delete/90901/non-english Del: in docs -- https://master.php.net/note/delete/90901/in+docs Del: other reasons-- https://master.php.net/note/delete/90901 Reject -- https://master.php.net/note/reject/90901 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#154629) next »