I dont see the point of having a page where they show how to set properties in the controller if they dont work. As you said, I did not use the long version of the write command, since it said on the page before how to set it up using properties.
On Sep 20, 6:30 pm, villas <[EMAIL PROTECTED]> wrote: > Before you criticise, are you sure that you read and tried what it > said in the docs? > > Example given in the docs is: > $this->Cookie->write('last_name', 'Masters', false, '1 hour'); > > Therefore you should be able to do this: > $this->Cookie->write('cart', array(124,1232,3232), false, '1 hour'); > > From your question, it does not seem that you tried that code. > However, if you really did find a 'better way', please make a > comment in the docs to help the next guy. > > Best wishes. > > On Sep 20, 2:05 pm, Kenchu <[EMAIL PROTECTED]> wrote: > > > Thanks! Works perfect now. Though I think it's bad they dont say this > > in the documentation. > > > On Sep 20, 11:42 am, "Yodi Aditya" <[EMAIL PROTECTED]> wrote: > > > > Try using : > > > function beforeFilter() { > > > $this->Cookie->time = '5 Days'; > > > $this->Cookie->path = '/'; > > > > } > > > > On 9/20/08, Kenchu <[EMAIL PROTECTED]> wrote: > > > > > I've managed to get cookies working for the session, but if I restart > > > > my browser, the cookies seem to be gone, and $cookieTime doesn't seem > > > > to do anything about it. This is the code I've got: > > > > > _______________________________________________ > > > > > [...] > > > > > var $cookieName = 'my.cookie'; > > > > var $cookieTime = 3600; > > > > var $cookieKey = '***************************'; > > > > > function index() { > > > > // $this->Cookie->write('cart', array(124,1232,3232)); > > > > pr($this->Cookie->read('cart')); > > > > } > > > > > [...] > > > > > _______________________________________________ > > > > > So what I do is uncomment the cookie-write-line, run the script, then > > > > comment the line again, and then run the script once more. Now if you > > > > DONT turn off the browser, you will see the array being printed. > > > > However, if I restart the page and visit it again, nothing will be > > > > printed. > > > > > Help plz. :D --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" 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?hl=en -~----------~----~----~----~------~----~------~--~---