SetSession (Object subroutine): Difference between revisions
Jump to navigation
Jump to search
m (misc formatting) |
|||
Line 20: | Line 20: | ||
==Examples== | ==Examples== | ||
The following | The following fragment creates a session called <code>GROUCHO</code> followed by a timestamp, then sets a cookie for a web application so that the session can be easily located on subsequent web requests. | ||
<p class="code">%sesid = 'GROUCHO' WITH $SirTime | <p class="code">%sesid = 'GROUCHO' WITH $SirTime | ||
%rc = $Session_Create(%sesid, , 3600) | %rc = $Session_Create(%sesid, , 3600) | ||
Line 27: | Line 27: | ||
==See also== | ==See also== | ||
<ul> | <ul> | ||
<li> | <li><var>[[GetSession (Object subroutine)|GetSession]]</var> </li> | ||
<li>[[Global and session objects]] | <li>[[Global and session objects]] </li> | ||
</ul> | </ul> | ||
{{Template:Object:SetSession footer}} | {{Template:Object:SetSession footer}} |
Latest revision as of 19:24, 11 July 2017
Set session object reference (Object class)
Syntax
%(Object):SetSession( name, source)
Syntax terms
%(Object) | The class name in parentheses denotes a shared method. SetSession can also be invoked via an Object class object variable, which may be Null. |
---|---|
name | A string that specifies the session name. |
source | This Object class object variable is set by SetSession to be referenced by the session name name.
source can be a %variable, a structure member, or a class member inside an object. |
Examples
The following fragment creates a session called GROUCHO
followed by a timestamp, then sets a cookie for a web application so that the session can be easily located on subsequent web requests.
%sesid = 'GROUCHO' WITH $SirTime %rc = $Session_Create(%sesid, , 3600) %rc = $Web_Set_Cookie('SESID', %sesid)