$t->setSessionValue( )


$t->setSessionValue( )

$t->setSessionValue($key, $value)

Description #

These are good reasons for interfacing to pages using a web API if it is available! Many interactive enquiry systems set a verification string and/or a session id. In this case two fetches may need to be made to access data. The first may set up the verification string (entering agreement info if required) and the second will access the actual data page.

Parameters #

$key - A String containing the reference to use for recall.
$value - The session value captured

Return values# 

Returns requested session value into $t->result on $->getSessionValue()

Examples #

Example Due to security reasons this example is only a guide and will not actually work if copied.

$t->fetch("[");] \\

$t->row("|index2.php\?eduId={EDUID}&display|U", "{EDUID}");

$eduid =  $t->result;

$t->setSessionValue("eduid", $eduid);

$eduid =  $t->getSessionValue('eduid');

if(!$eduid) {
 return "Please login.";

Notes #

The session value is unique to a user and answerspace. Clearing cookies can clear the session id values.