I want add 11 rows in the table.
in view :
<?php echo $this->form->create('Detail',array('action'=>'add'));?> <fieldset>
<legend>Add New Detail</legend><?php for($i=0;$i<$count;$i++){
echo $this->form->input('Detail.$i.name');
echo $this->form->input('Detail.$i.text');
echo $this->form->input('Detail.$i.taille');
echo $this->form->input('Detail.$i.police');
echo $this->form->input('Detail.$i.bold');
echo $this->form->input('Detail.$i.italic');
echo $this->form->input('ticket_id');}?>
form->end('Submit');?>
in my controller DetailsController:
public function add($count=1) {
$tickets= $this->Detail->Ticket->find('list');
pr($tickets);
if($this->request->is('post')){
$this->Detail->saveAll($this->request->data['Detail']);}
$this->set('tickets', $tickets);$this->set('count', $count);}
my problem is : the code save 11 rows similar to the last input( exp: in browser i add nom1 nom2 nom3 .. nom11 but in table: add 11 rows renamed nom11 ) I'am sorry my bad English language