this is what i have inside my controller,
and i just don't know why mine doesn't working.

can any1 point me to the right direction?

Tom

------------
CODE------------------------------------------------------

        var $components = array('Cookie');

        var $cookieName = 'myCookie';
        var $cookieKey = 'has82js737hak2';
//      var $cookieDomain = '.message.localhost';

        function __construct()
        {
                parent::__construct();
                $this->cookieDomain = '.'.$_SERVER['SERVER_NAME'];
        }

        function index()
        {
                // get the Data from DB and put them inside variable $data
                $this->set('data', $this->Message->findAll());

//              if($this->Cookie['name'])


//              $value=array("login","password");
//              $this->Cookie->write('login',$value,"+5 day");

                if($this->Cookie->read('name'))
                {
                        $this->set('data2', $this->Cookie->read("name"));
                }
                else
                {
                        // no cookie has been setted
                        $this->set('data2', "Guest");
                        $this->Cookie->write("name", "Tom", TRUE, time()+3600);
                }


        }


--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to