Get magento session variable on another page

I set an array variable in a session on a magento modal page and want to get on another page, such as getuserdata.php, but not get to another page. I set the variable and get on one page and then fully retrieve.

My code is similar ...

// code of the first page.

$session = Mage::getSingleton("core/session",  array("name"=>"frontend"));
$fldata = 'work for set data';
$session->setData("free_auth", $fldata);

// other page code.

session_start();
require_once ("../../app/Mage.php");
umask(0);
Mage::app('default');
$session = Mage::getSingleton("core/session",  array("name"=>"frontend"));
$stl1 = $session->getData("free_auth");

Anyone can help me in solving this problem.

+5
source share
1 answer

Magento, Magento, , magento/app. , , Magento, jjery ajax , . ajax .

.

$fldata = 'work for set data';
Mage::getSingleton('core/session')->setMyCustomData($fldata);

.

session_start();
$sessionfree = Mage::getSingleton('core/session', array('name' => 'frontend'));
$abcfree = $sessionfree->getMyCustomData();
+2

All Articles