RE: [PHP] Sessions

From: Date: Sun, 29 Apr 2001 12:08:24 +0000
Subject: RE: [PHP] Sessions
Groups: php.general 
Request: Send a blank email to php-general+get-50799@lists.php.net to get a copy of this message
The SID will only be added automatically if -enable-trans-sid is set and your browser has cookies switched off. When cookies are on the session id is propagated using a cookie. So likewise the <?=SID?> constant will only be expanded when cookies are switched off. Anyway, yes you will have to add <?=SID?> to all your URL's if you want people to be able to access it with cookies disabled. Plus you will need to add a hidden field on all your forms i.e. <INPUT TYPE="HIDDEN" NAME="TESTSESSID" VALUE="<?php echo session_id()?>"> so that the session_id is propagated when ther form is submitted. When you changed you session_name did you remember to call session_start again. session_name("TESTSESSID"); // session i want to use session_start(); // start specified session. -Stewart -----Original Message----- From: Jennifer [mailto:toxlists@canada.com] Sent: 29 April 2001 09:51 To: php-general@lists.php.net Subject: [PHP] Sessions I have been doing a few test pages trying to figure out how sessions work. The SID is not being automatically added to my urls so I assume that means that php was not compiled with -enable-trans-sid (I'm on a virtual server so I can't access php.ini) So that means that I need to add <?=SID?> to all my urls, correct? Can I change the value of session_name() and still have the above work for the new session name? I tried it and the session_name was changed to the new value, but then SID seemed to be empty after that. Is there something I am missing or is that the way it is supposed to work? Jennifer -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#50799) next »