sir its storing only "0" i has to change something like 1 or 2 or 3
etc.

its not giving any error sir

On May 13, 12:54 pm, Jeremy Burns <jeremybu...@me.com> wrote:
> I think your model name should be Agency, for a start.
>
> You haven't specified what error you are getting. What do you get when you 
> debug $this->data just before you do the save?
>
> Jeremy Burns
> jeremybu...@me.com
>
> On 13 May 2010, at 08:48, Master Ram wrote:
>
>
>
> > Hi... all
>
> > i am getting "agencies" table  field in to drop down. but i am not
> > able to store the selected item in to the "promoters" table ".
>
> > this is the code i user.
>
> > My table name is: "promoters" the fields are promoter_id,
> > agency_id.etc.,
>
> > this is my view code:
>
> > <?php
> >                 e($form->select('agencyId',
>
> >                               array(
> >                               'empty' => '-All Suppliers-',
> >                               $agencies),
> >                               null,
> >                               array(
> >                               'id' => 'agency_id',
> >                               'style' => 'width: 50%'),false));
> >                 ?>
>
> > this is my controller code:
>
> > function promoter(){
>
> >      $agencies = $this->Agencie->find('list',
> >                                           array(
> >                                           'fields' =>
> > array('agency_id','name'),
> >                                                            'order' =>
> >                                                            array(
>
> >                                                                'name
> > ASC')));
>
> >        $this->set('agencies',$agencies);
>
> >        if (!empty($this->data)) {
>
> >            $this->Promoter->create();
>
> >            $this->Promoter->save($this->data);
>
> >            $this->Session->setFlash('The User has been registered,
> > please login');
>
> >            $this->redirect(array('action'=>'promoters_step_two'));
>
> >        }
>
> >    }
>
> > where i did the mistake Please help me
>
> > 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 cake-php@googlegroups.com
> > To unsubscribe from this group, send email to
> > cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> > athttp://groups.google.com/group/cake-php?hl=en
>
> 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 cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> athttp://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 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