utses.wbb - Manage Session Record

Syntax

CALL "utses.wbb",mode,sesrec$,errmsg$

Description

This program provides an interface to read, write, and delete the session record, if present. Session tracking can be initiated in the program by creating a global string (STBL) $sestpl before CALLing utcgi.wbb. This string is a string template definition to describe what session data the BASIC Web Utility should store. The BASIC Web Utility generates an HTTP cookie ($sesid) to retain the session ID code that the data is stored under.

Parameter

Description

mode

Record management mode. Use 0 to read the session record, 1 to write it, or 2 to delete it. If mode is 0, sesrec$ returns the session record. If mode is 1, it is used to update the session record. It is ignored if mode is 2.

sesrec$

Session record.

errmsg$

Error message to return if an error occurs. If this value is not blank on exit, there was a problem in session tracking, and the application should take measures to display and/or work around the error.

This program uses the file utses.dat, stored in the BASIC Web Utility directory and is created automatically if not found. It has a key size of 22 and a record size of 512.