I would suggest you run through baking a small app to see how the MVC
bits fit together (http://book.cakephp.org/view/113/Code-Generation-
with-Bake)

The Model is where your data and business logic goes. The Controller
handles getting the data from the Model and preparing it for the View.
The View handles displaying the data, and interacting with the user.

Your process_members.ctp (View) would have a form on it that would
submit to the Controller, which would then deal with updating the
Model.

On Jan 14, 12:40 pm, "xybersoftw...@gmail.com"
<xybersoftw...@gmail.com> wrote:
> Do it in the controller? I guess that is where I am not
> understanding...
> How do I get my data from the php code in the thtml file into the
> controller? An array_push?
> Do I use the save or savefields? Do I need to pass the record id or
> index to the controller?
> Does my thtml view php interate through the database building up data
> for the fields I want changed and then I process the build up in the
> the controller save?
> I am reading the cake php manual 
> athttp://book.cakephp.org/view/75/Saving-Your-Data
> but still don't quite understand...
> Thx for your help
>
> On Jan 14, 11:04 am, Miles J <mileswjohn...@gmail.com> wrote:
>
> > Do it in the controller.
>
> > On Jan 14, 10:39 am, "xybersoftw...@gmail.com"
>
> > <xybersoftw...@gmail.com> wrote:
> > > I have a cake view called process_members.thtml.
> > > In the view I have setup some filtering and check boxes. If one of the
> > > check boxes is marked I want to write the current date to a field in
> > > the database.
>
> > > So I start Iterating through the database looking at records and so I
> > > may be writing to more than one record during this process...
>
> > > for ()
> > > {
> > >    if ($chkMark=='1')
> > >    {
> > >       // Mark selected months
> > >       if($chkMonth1=='on')
> > >          $subscription['Subscription']['month1_mailinginfo_sent']=date
> > > ('Y-m-d');
> > >    }
>
> > >    //Then the field is displayed:
> > >    <td><? echo $subscription['Subscription']
> > > ['month1_mailinginfo_sent']; ?></td>
> > >    //The date shows up here but when I go look at the database it has
> > > not been written to...
>
> > > //end for
>
> > > }
>
> > > How can I get this date written to the database?- 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to