Hi all,
I am using cakePHP 1.26.
In a controller, I got a function:
function testing(){
$userinfo=$this->Test->findAllByuser_id();
$this->set('userinfo',$userinfo);
}
I founf that the variable "userinfo" which contained some array data was only accessible in the testing.ctp.
to make the variable "userinfo" accessible to other .ctp files, I made use of this helper:
$this->Session->write('userinfo', $userinfo);
Yet, I am not sure how come the variable defined by the Set() function can't be accessed by other .ctp files but the Session can.
is there any best way of doing the same thing by using other method instead of using Session?
Please advise.