If you compile it with --enable-trans-sid, then PHP will use cookies when they are available and if they are not, it'll append the SID to links and forms. Basically, it's automatic.
---John Holmes... ----- Original Message ----- From: "Jeff Field" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, June 05, 2002 12:56 PM Subject: [PHP] Sessions question (-enable-trans-sid) > Hi, > > I'm confused about one thing regarding sessions and haven't been able to > find the definitive answer anywhere. Hopefully, I can here. > > There are two ways to enable sessions: > > 1) Session ID is passed through cookies > 2) Session ID is passed through the URL, either done manually or by > automatic URL rewriting > > All the books, tutorials, etc. basically say that cookies are the way to go > but "when users don't have cookies enabled, you have to use the URL method". > Since I have an e-commerce site that is available to the world, I'm assuming > *some* are not going to have cookies enabled. Duh! > > So, from what I've read, you can implement the URL method of sessions by > either manually attaching the session ID to the URLs, or, by compiling PHP > with enable-trans-sid, which will add the session ID to the URL's > automatically. The answer that I haven't been able to find is this: > > Is this a one or the other proposition? IOW, if I implement sessions with > cookies, then I can't use the URL method? Or, if I implement the URL method > (with enable-trans-sid), I can't use the cookie method? Or, do they work in > combination. IOW, does PHP automatically know that if a user has cookies > enabled, PHP will use the cookie method and, when cookies are *not* enabled, > PHP automatically implements the URL method? > > Thanks for the help! > > Jeff > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php