Table of Contents
Session variables allow persistency between page accesses. RSP session variables are only guaranteed to work if the user's browser allows cookies. On his first access the user is assigned a unique identifer through a cookie. Subsequently the user provides this cookie when accessing pages and thus the web server can assign the correct session to the page access. If a session is dormant for too long it will be destroyed and the memory it used released.
An RSP session consists of a list of session variables. Each session variable has a string name and a string value. RSP does not support non-string session variables.
You can set and reset a session variable using the setsession() function. Subsequently you can read a session variable's value using the session() function.
To remove a session variable and all the memory associated with it use the clearsession() function. If you use this function with no arguments it will remove all session variables. Session variables are often used to hold login information, clearing them all at once is a good way to log off the user.
The sessionkeys() function returns an array of all the session variables.