Session variables allow web developers to store visitor information. This information can be accessed on all other web pages within a specific web site. Unless specified otherwise, session variables expire 20 minutes after a visitor leaves the site. Session variables will also expire if no activity is detected on the site for 20 minutes by that specific site visitor. In order for session variables to work, the visitor's browser must be set to accept cookies. Additionally, the pages for the site must be located within the same directory on the web server. Information stored in session variables is site visitor specific. Different site visitors cannot access each other's session variable information.
Session variables are usually set using information supplied in a form by site visitors. The example in this TechNote uses information from a form element to set a session variable. This example assumes familiarity with the features within Dreamweaver UltraDev.
UltraDev has a menu driven feature to write session variable information to a page once a session variable has been created. The UltraDev application also has a menu driven feature to create a session variable. However, UltraDev doesn't provide a menu driven feature to assign a value to a session variable. Assigning a value to a session variable must be done manually within the HTML source code.