bombusbee.com Logo bombusbee.com
PHP Tricks

November 30, 2001

::: Magic session maintenance! :::
Page 3 of 3 ::: 1 2 3 ::: view printable
One more cool trick that (as far as I know) is enabled by default is related to sessions. Sessions are most commonly maintained by setting a cookie in the users browser with some sort of session ID, or by passing that same session ID as a query string or form variable from page to page. Because there is the possibility of people turning off cookies in their browser, sites concerned that they may lose those users' sessions often rely on passing the session ID via form and query string variables. This can get somewhat tedious, making sure to append the session identifier for every link and form on your site. PHP has a smarter solution.

When the PHP setting for session.use_trans_sid is turned on, PHP will automagically append the session ID to all links and forms when cookies are disabled. And only when cookies are disabled! How cool is that? You just set your session variables and never have to worry about whether the session will be sustained because PHP takes care of that for you!

There are other great things you can do with the session, like creating your own session-handling engine, changing the location of the session files, etc. In fact, there is a lot of stuff you can configure yourself using PHP. See more at http://www.php.net/manual/en/configuration.php.  End of article


<< Global include directory  

© 2000-2008 bombusbee.com, all rights reserved


Fusebox inside   Powered by PHP   Powered by MySQL   Powered by Apache   SourceForge: support opensource software

Fusebox: Developing Coldfusion Applications

Discovering Fusebox 3 for ColdFusion

Get the new Fusebox books!