Try

if($this->Note->save($this->data))

I suggest to go through the blog tutorial first of all (or just after
read the basics of the manual) if you are new to Cake.

On Jul 23, 4:39 pm, aswamr <[email protected]> wrote:
> I am new to Cake PHP. Trying to create my first project with single table
> 'notes'. Following is my
> notes_controller which has add() function.
>
> function add()
>     {
>         if (!empty($this->data))
>         {
>            echo "if";
>            if($this->Note->save($this->data['Note']))
>            {
>                 $this->flash('Your note has been updated.','/notes/');
>            }
>         }
>         else
>         {
>             echo "else";
>             echo $this->data['Note']['Note/title'];
>         }
>     }
> But even if i enter some valid data click 'save', it gets inside the else.
> It seems that $this->data donot get any data. What shall i do now?
> --
> View this message in 
> context:http://www.nabble.com/%24this-%3Edata-donot-retreive-any-value-tp2462...
> Sent from the CakePHP mailing list archive at Nabble.com.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" 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