Re: Sessions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 14 Sep 2008, at 17:03, Tom Shaw wrote:
When you start a session using session_start() and start adding indexes to the session super global array a small cookie is set on the clients side that keeps track of the user, and the session index data that you create is stored only in the memory on the server side unless specified in the PHP file to store the session data in some specified directory or means db. Plus you can access and manipulate the session array just like you could any
other array.

By default session data is stored in files in /tmp. This can be changed in php.ini. You can also completely override the session management system allowing you to store the data anywhere you want. For example: http://stut.net/blog/2008/07/20/mysql-sessions/

You can indeed access and manipulate the session array just like any other array but there's one important different. Session array keys must be valid variable names. This means that you cannot use numeric indexes, and there are a few other restrictions. For more info see the manual (http://php.net/language.variables).

-Stut

--
http://stut.net/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux