You should be able just do a $this->Moviegenre->save($this->data)
The save function will loop through your array and save all the data into the correct fields along with the value set by your check box. On Apr 6, 4:10 am, Ranju <hello.ra...@gmail.com> wrote: > hello i want to insert multiple chekbox values... > > View File > > <?php echo $form->input('Moviegenre.genreid[]',array('label'=>false, > 'type'=>'checkbox','multiple'=>true,'value'=>$genre['Genre']['id'])); ? > > > > Controllercode > > $genreid= $this->data['Moviegenre']['genreid']; > > foreach($genreid as $key => $value) > { > $query = "insert into moviegenres(genreid)values($value)"; > $update = $this->Moviegenre->query($query); > > } > > Its not work --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---