I have a controller ...
class Testcontroller extends AppController{
function beforefilter(){
$this->Session->write('sess',"hello");
}
function index(){
$var2=$this->Session->read('sess');
$this->set('var1',$var2);
}
}
now when i try to render echo $var1 in my view I am not getting the
output as hello but when I write $this->Session-
>write('sess',"hello"); in my index method then I am getting my
desired output from the session. Can anyone explain this phenomenon to
me. Well the concept of php says we should be abe to access the
session from the index....Am i missing something ?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---