Re: Session and sessionid
sessions are given an id automatically by the php engine, you don't need to do anything manually for that. same about the handling, it's all automatically. you can basically just use the session without doing any checking on your own, you can trust php for that. (it's not perfectly secure, but it does the job very well) (correct me if i'm wrong) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Session and sessionid
Thanks so far for the answers! I have an index-page with a form. The user enters data and saves it to the database (data-table). The data-table has a data_id as key. Now I would like to save this actual data_id for the user. So the user can go to different pages and when he comes back to the index-page, he is still known as the one who entered the data. How do I start a session, save the var for the user and so on? Thanks for the help! Felix --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Session and sessionid
how long does that data need to stay in the database? only during the session? (like 30, 45 minutes, whatever?) then you could just save it all save it in the session ($session-write()) if longer then that, i would just create a user_id field in the datatable to store the user_id. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Session and sessionid
Hi Dieter, 30 Minutes is more than enough. It only needs to be saved in the session. So, then I will try to figure out, how $session-write works. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Session and sessionid
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 cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Session and sessionid
Well, this ( http://manual.cakephp.org/chapter/session ) would be the short introduction to cake sessions. If that doesn't answer your question, perhaps be a little more specific as to what you want (I'm not sure why you would want to handle the mechanics of sessions yourself). --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---