So, now i figured out how to handle sessions. And it is extremely
simple!
For all those, who are also thinking about using sessions, here is what
I did:
In the core.php in the /app/config folder I've set the following line
to tmp, because I want cake to store the data in the tmp folder
define('CAKE_SESSION_SAVE', 'tmp');
In my Controller in the index function I save the value in the session:
$myID="whatever you want";
$this->Session->write('ID', $myID);
So, now you can access this ID on every page just by adding this code
to your function in the controller:
Here for example the function for the view page:
echo $this->Session->read('ID');
And this will print out "whatever you want".
Cheers
Felix
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" 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
-~----------~----~----~----~------~----~------~--~---