Thanks for ur answer On Fri, Apr 17, 2009 at 3:26 PM, John Andersen <[email protected]>wrote:
> > Corrected as I see it :) > > On Apr 17, 11:10 am, kryska <[email protected]> wrote: > > Hola a todos! > > > > Tengo una vista index.ctp con el código: > > <?php > > echo $form->create( 'Cliente', array( 'action' => > 'borrarseleccionados' ) ); > > > foreach ($clientes as $cliente): > > echo $cliente['Cliente']['id']; > > echo > $html->link('Editar',array('action'=>'editar','id'=>$cliente > > ['Cliente']['id'])); > > echo $form->checkbox('Clientes.id.['.$cliente > > ['Cliente']['id'].']', array('value' => $cliente['Cliente']['id'])); > > endforeach; > > echo $form->end('Borrar'); > > /* > > echo $html->link('Borrar',array > > ('action'=>'borrarseleccionados')) > */ > > ?> > > > > De esta forma los checkboxes seran Messages.id.[1], Messages.id.[2], > > Messages.id.[3]… > > > > Y el clientes_controller: > > function borrarseleccionados() { > > foreach($this->data['Clientes'] as $key => $value) { > > if($value != 0) { > > $this->Cliente->del($value); > > } > > } > > > > } > > De esta forma recibo el error:Invalid argument supplied for foreach() > > Y si ponto function borrarseleccionados($value) recibo el error: > > Missing argument 1 for ClientesController::borrarseleccionados() > > > > No se como pasarle los valores a la funcion....o lo que estoy haciendo > > mal. > > > > Agradecería muchisimo algo de ayuda.... > > Saludos! > > > -- By A.Banusundar --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
