The fastest easiest way to get it right.

SessionGet

NAME

SessionGet

FUNCTION

The PHP function Session get returns a session variable. The second parameter is a Standard Default Value and will be returned if the Session variable Var_Name does not exist.

The framework itself tracks only 2 session variables. These are UID, which is user_id, and PWD, which is user password. An application must be careful not to overwrite those values, as the framework will make no provision to prevent such an accident.

INPUTS

string $key key for the value to receive from $_SESSION mixed $default default value for key

RETURN VALUE mixed value associated with $key

SOURCE

function SessionGet($key,$default="",$sfx='app') {
   $xkey=$GLOBALS["AG"]["application"]."_".$sfx."_".$key;
    if (isset($_SESSION[$xkey])) {
        return $_SESSION[$xkey];
    }
    else return $default;
}

User Comments

There are no user comments yet on this page.


Add A Comment

Comments will not appear until after they are moderated. Comments are usually moderated within a few hours on weekdays, but may take longer on weekends and holidays.

Name or nickname: (This will appear with your comment)


Email (this will never be displayed)


Enter your comment here. Use [b] and [/b] for bold, [i] and [/i] for italic, and [pre] and [/pre] for code samples. All literal HTML and PHP that you enter will be escaped out and displayed as you enter it.


Home |  Documentation |  Download |  Credits |  Contact |  Login
Andromeda © Copyright 2004-2010, Licensed under the GPL Version 2