Goto: 4C Home | 4C Docs | req4c Docs | req4c Function List req4c_use_session()

req4c_use_session()

Purpose:
req4c_use_session() sets the requested session as the current session.
Usage:
$tf = req4c_use_session(<session>);
Arguments:

<session> - The session resource returned by a previous call to req4c_open_session() or req4c_create_session().
Returns:
false - Error
true - OK
Where Used:
req4c_use_session() can be called from anywhere.
Example:
Description:
req4c_use_session() is useful if you are using multiple req4c sessions at once. Using multiple req4c sessions at once is useful if you need to run 4C programs on different 4C servers or using different 4C applications on the same server. In most cases, you shouldn't need this capability. In most cases you should be able to just use the default FCServer and FCApp in the 4creqd configuration. req4c_open_session() verifies that the sessionid is valid and has not expired. If req4c_use_session() is successful, the session is made the current session and the sessionid is stored in the variable $_REQ4C['sessionid']. All session variables are also initialized into the $_REQ4C_SESSION array.
Bugs/Features/Comments:
req4c_open_session() requires a round trip to the 4creqd process.
req4c_use_session() clears the current message list
See Also:
req4c_create_session()
req4c_open_session()
req4c_close_session()
req4c_delete_session()
req4c_verify_session()
req4c_get_sessionid()


Back to Top