PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
The reason I ask is because if I return to my sript that uses them they are still active even though I haven't called the script for a few hours.Do they expire after a period or is it necessary to kill them?
I thought to perhaps use a 'log-off' button to kill the session variables, is this necessary?
they stick around in the browser until you close all instances of the browser (typically). Depending on server settings, and where you store the session data, the actual data behind the session may be destroyed after a time. But that depends on your settings.
A session by default is set to 180 minutes. Youc can change this in your php.ini file or you can use the session_cache_expire() function to set the sessions expiration time. Check out the PHP docs for more info. I hope this helps.