With --enable-trans-sid the problem still exists. For example, a user logs in and cookies are disabled. He browses to a page which doesn't load the session. Then from there he goes to a page that does use sessions. Unless I'm mistaken, --enable-trans-sid won't add the session ID unless the session is started on the page.
-----Original Message----- From: Jason Wong [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 07, 2002 11:24 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] How to keep form inputs from being cleared On Friday 08 February 2002 04:33, CompMan86 wrote: > I posted about this a few days ago. I received several responses but > none of them were very helpful (thanks for the effort though). I finally > figured out what it was by process of elimination. At the top of my > registration form, I put session_start() just like I did for all my > other scripts. Well it turns out that by doing this, for some reason, it > clears the form. I have a hunch that the cookie request by > session_start() has something to do with it. Well, the only reason > someone would be at the registration form would be if he/she was not a > member, therefore the session ID would be pointless. > > This is the major flaw of PHP's built in sessions imho: If a user > disables cookies, the session functions assign the session ID to the > constant SID. However, if the SID is not passed on religiously, a new > session will be made. In an instance like this where session_start() > cannot be used, you can't pass on the SID. It seems like I'm just going > to resort to requiring that my users enable session cookies. The hastle > of making the code to use both SID and/or cookies just doesn't seem > worth it. If anyone has any ideas of a resolution to this problem, feel > free to post here or email me. If you have full access to your server you can recompile php with the "--enable-trans-sid" option. Once this is done the SID will be *automagically* be propagated via the URL or hidden form elements. An extremely useful feature if you need sessions and cannot rely on the user having enabled cookies. -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk /* Type louder, please. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php