well i have a form with two fields. a field for users firstname and lastname. when the user hits the "ok" button these information should be saved into my database....but instead, the error occurs........
On 25 Jul., 17:54, Norman Paniagua <[email protected]> wrote: > The information is not printed in your view? If there is so, it was because > you need to call so > > $this->data = $this->Yourtable->findByAField($field_value); > > And whe you want to update > > $this->YourTable->read('null', $tableId); > $this->YourTable->set('field_1', $field_1); > $this->YourTable->set('field_2', $field_2); > > I hope its help you > --- > > Norman Paniagua > > 2010/7/25 Tomfox Wiranata <[email protected]> > > > hi, > > > this error occurs when i enter the firstname and lastname in a form > > and try to update my profile. it is supposed to write this information > > in the database. why does this error pops up, although i do have these > > two attributes in my table?? > > > my controller: > > > function updateProfile() > > { > > > $updates = $this->User->findByUsername($this->Session- > > >read('User.username')); > > $updates['User']['firstname']= > > $this->data['User']['firstname']; > > $updates['User']['lastname']= > > $this->data['User']['lastname']; > > > my view > > > <?php echo $form->create('User', array('action' => > > 'updateProfile')); ?> > > > <div class="row"> > > <span class="profiledata"><?php echo > > $form->input('Vorname', > > array('value' => $user['firstname'])); ?></span> > > </div> > > > <div class="row"> > > <span class="profiledata"><?php echo > > $form->input('Nachname', > > array('value' => $user['lastname'])); ?></span> > > </div> > > > <?php > > echo $form->button('Sichern', array('type' > > => 'submit')); > > echo $form->end(); > > ?> > > > thx for your help :) > > > Check out the new CakePHP Questions sitehttp://cakeqs.organd 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]<cake-php%[email protected]>For > > more options, visit this group at > >http://groups.google.com/group/cake-php?hl=en 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
