Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8631437
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T09:13:09+00:00 2026-06-12T09:13:09+00:00

I set array variable in session in magento modal page and want to retrieve

  • 0

I set array variable in session in magento modal page and want to retrieve in another page like getuserdata.php but not get in another page. I set variable and get in one page then in completely retrieve.

My code is like..

//first page code.

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

//another 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 for that stuff problem..

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T09:13:09+00:00Added an answer on June 12, 2026 at 9:13 am

    If we create a session in Magento, then we can only use that session in Magento files like in the magento/app folder. If you want to use that session in external files create by you then you must first get the session in another Magento default file and then call a jquery ajax function and pass session variable through it to get it in an external file. You also pass the variable through ajax without the use of the session.

    Set session data like this.

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

    and get data like this.

    session_start();
    $sessionfree = Mage::getSingleton('core/session', array('name' => 'frontend'));
    $abcfree = $sessionfree->getMyCustomData();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I can't see why the variable $errorMessage will not set with array errors. I'm
I normally save new data to the database like this: $this->MyTable->set(array( 'id' => $id,
I got a result set in array format and i want to make square
I'm trying to submit a page onto itself by using php echo $_SERVER['PHP_SELF']; but
I've created a page that requires a session variable which will be inserted into
I am trying to get an array to pass in a session variable from
I use the PHP Session variable to have a user login and edit their
i have a two dimensional array, and i want to retrieve its value in
I have this session variable which i am trying to set to an access
Hello I'm working on a problem that requires me to change an set array

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.