Difference between revisions of "GETSESSIONVAR()"
From Lianjapedia
Yvonne.milne (Talk | contribs) (Created page with "==Purpose== Function to return the value of a session variable in a .rsp script or return an alternative value if the variable does not exist ==Syntax== GETSESSIONVAR(<expC1>...") |
Yvonne.milne (Talk | contribs) |
||
Line 6: | Line 6: | ||
==See Also== | ==See Also== | ||
− | [[ARRAY()]], [[FOREACH]], [[FUNCTION]], [[GETMEMBER()]], [[ | + | [[ARRAY()]], [[FOREACH]], [[FUNCTION]], [[GETMEMBER()]], [[GETPARAMETER()]], [[PARAMETERS]], [[PARAMETERS()]], [[PCOUNT()]], [[PROCEDURE]], [[RETURN]], [[SET PROCEDURE]] |
==Description== | ==Description== |
Latest revision as of 11:49, 19 May 2014
Contents
Purpose
Function to return the value of a session variable in a .rsp script or return an alternative value if the variable does not exist
Syntax
GETSESSIONVAR(<expC1>, <expC2>)
See Also
ARRAY(), FOREACH, FUNCTION, GETMEMBER(), GETPARAMETER(), PARAMETERS, PARAMETERS(), PCOUNT(), PROCEDURE, RETURN, SET PROCEDURE
Description
The GETSESSIONVAR() function is used in .rsp scripts to return the value of a session variable or return an alternative value if the variable does not exist. The name of the variable is specified in <expC1>. An alternative value for the variable is specified in <expC2> and this will be read if the variable does not exist.
Example
ss=len(_SESSION) if ss > 0 ? "Active session variables ("+alltrim(str(ss))+")" foreach _session as name=>value ? "<br> &name="+etos(value) next else ? "There are no active session variables." endif ?"<br>" ? "start_time = " + getsessionvar("start_time",time()) ?"<br>"