Signature
String session_start(String session_name = "uce-session")
Parameters
session_name : optional name of the session cookie, defaults to "uce-session"
return value : the current session ID
Starts a session or reconnects to an existing one.
If the cookie named by session_name does not exist, UCE creates it and fills it with a new unique session ID. The function then loads the session data for that ID.
After session_start() completes, the following context fields are populated:
context.session_idcontains the current session ID.context.session_namecontains the current session cookie name.context.sessioncontains the current session data. The session data is automatically saved after the request completes.
Example
String id = session_start("uce-doc-example");
print(id != "" ? "started\n" : "empty\n");
Output
started