You can do it (like the tutorial states) by this:
$defaultNamespace = new Zend_Session_Namespace('Default');
if (isset($defaultNamespace->name))
{
echo $defaultNamespace->name;
}
else
{
$defaultNamespace->name = "hi";
}
First, you need to create the Session Object using:
$defaultNamespace = new Zend_Session_Namespace('Default');
By defining a custom value in place of default, it means that none of your variables will mix with variables from other systems, or other parts of your system that use unique values in place of default.
After that, every variable can be accessed like a regular class variable
Any variable can be assigned using
$defaultNamespace->variable_name = value;
To get any value, simply get the same value;
$variable - $defaultNamespace->variable_name; // gets value
As Pascal noted, you also need to call
Zend_Session::start();
before all of this.
To find out more about it, use the Basic Usage Examples.