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 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