Re: difference between $this->data and $this->set('data')

2007-06-30 Thread gwoo
$this->data is also available in your view in Cake 1.2. It is a copy of $this->data that is in the controller. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to c

Re: difference between $this->data and $this->set('data')

2007-06-30 Thread citrus
$this->set('data', array()) will make $data available in your view. That means, you can write something like echo $data; in your view file. On the other hands, $this->data contains submitted data from your form. On Jul 1, 3:22 am, bingo <[EMAIL PROTECTED]> wrote: > hi, > > Can someone can tell m

Re: difference between $this->data and $this->set('data')

2007-06-30 Thread citrus
$this->set('data', array()) will make $data available in your view. That means, you can write something like echo $data; in your view file. On the other hand, $this->data contains submitted data from your form. On Jul 1, 3:22 am, bingo <[EMAIL PROTECTED]> wrote: > hi, > > Can someone can tell me

Re: difference between $this->data and $this->set('data')

2007-06-30 Thread Grant Cox
And in case you weren't aware - you can access $this->data directly in both the view and the controller. So in your view you can have something like: Change password for `data['User']['name']; ?> input('User.password'); ?> and both parts here will access the same user object, from $this- >data

Re: difference between $this->data and $this->set('data')

2007-06-30 Thread Grant Cox
$this->set('yourvar', $somedata) will create a variable called $yourvar in the view, with the passed data. $this->data is model data that is from/for a form - all of the FormHelper functions look at $this->data to prepopulate from, and all the data they submit comes into your controller under $t

difference between $this->data and $this->set('data')

2007-06-30 Thread bingo
hi, Can someone can tell me the difference between using $this- >set('data', array()) and $this->data in controller. I am especially getting confused about this in relation to form. In general to send data to view, we have to set the variable using $this- >set(data, array). But to set the form, w