My form does not have any editable fields... I only want to change certain fields of the records that are shown in the view if a user checks a check box and clicks submit... If the user checks the box then I want to mark all the records that are shown with todays date... I guess the question now is how do I post the data from the view so that in the controller so I can update the database... PS I am working through the baking test app as you suggested...
On Jan 14, 3:36 pm, Webweave <webwe...@gmail.com> wrote: > You will find the data you need in $this->data after the form has > submitted (assuming your form is built correctly and posting to the > right action). > > On Jan 14, 1:39 pm, "xybersoftw...@gmail.com" > > > > <xybersoftw...@gmail.com> wrote: > > Ok got it to write to the database from the controller by hard coding: > > $this->Subscription->saveField('month1_mailinginfo_sent', date('Y-m- > > d')); > > But it added a new blank record with the month filled in...not really > > what I wanted but a baby step forward... > > How do I post from the php code of the view? Also I will probably > > need to POST the id of the record I need to update so when I loop > > through in the controller I know what records to update. I have the > > record id handy in the code so how to post is what I am not > > understanding... > > > view/process_member.thtml > > for () > > { > > if ($chkMark=='1') > > { > > // Mark selected months > > if($chkMonth1=='on') > > $subscription['Subscription']['month1_mailinginfo_sent']=date > > ('Y-m-d'); > > ****THIS IS WHERE I NEED TO POST BUT NOT SURE HOW TO DO THAT?? > > *** > > } > > > On Jan 14, 12:49 pm, Miles J <mileswjohn...@gmail.com> wrote: > > > > Are you POSTing the data (checked checkboxes) to anywhere? If so loop > > > the $this->data array in the controller.- Hide quoted text - > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---