On Sun, Jul 25, 2010 at 1:44 PM, Tomfox Wiranata
<[email protected]> wrote:
> hey cricket, thx. it makes sense. but if i code
>
>        if (!empty($this->data))
>        {
>
>                if ($this->User->save($this->data))
>                        {
>                                $this->Session->setFlash('Profil 
> aktualisiert');
>                                $this->redirect(array('controller' => 'users', 
> 'action' =>
> 'profile'));
>                        }
>                        else{
>                                $this->Session->setFlash('Speichern 
> fehlgeschlagen');
>                                $this->redirect(array('controller' => 'users', 
> 'action' =>
> 'editprofile'));
>                        }
>        }
>
> cake inserts a complete new data in my table and does not update the
> on that is edited. the error occurs not though :)

You have to include a hidden form element with the record ID. See this
page in the tutorial:

http://book.cakephp.org/view/340/Editing-Posts

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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