Maybe this can help you:
http://book.cakephp.org/view/75/Saving-Your-Data


On 23 mar, 12:24, ANDREA  SANCHEZ <[email protected]> wrote:
> TENGO EL SIGUIENTE FORMULARIO
>
> <div class="recordNotes index">
>
> <h2><?php __('RecordNotes');?>
> <?php  if(isset($schedule)): ?>
> <?php __('for');?> <?php echo $schedule;?>
> <?php endif;?></h2>
> <?php echo $form->create('RecordNote',array('action' =>
> 'teacher_add'));?>
>   <div class="input text"><label><?php __('Subject');?></label>
>         <?php       $options = array();
>                                 foreach ($subjects as $subject):
>                                 $options[$subject['Subject']['id']] = 
> $subject['Subject']
> ['name'];
>                         endforeach;
>                         echo $form->select('subject_id', $options, null,null, 
> false);?
>
>     </div>
>  <div class="input text"><label><?php __('Teacher');?></label>
>         <?php
>         $options = array();
>                  foreach ($teachers as $teacher):
>                 $options[$teacher['User']['id']] = 
> $teacher['User']['last_name'].'
> '.$teacher['User']['name'];
>      endforeach;
>      echo $form->select('teacher_id',$options,null,null,false);
>  ?></div>
>
> <table cellpadding="0" cellspacing="0">
> <tr>
>         <th><?php __('Student');?></th>
>         <th><?php __('Note');?></th>
> </tr>
>
>         <tr>
>
>         <?
>            $i =0;
>         foreach ($students as $student):
>  ?><td>
>                         <? echo 
> $form->label($student['Student']['last_name'].' '.
> $student['Student']['name']);
>                                 $options = $student['Student']['id'];
>                         echo $form->hidden('student_id'.$i, array('value' =>
> $options));?>
>                 </td>
>
>                 <td>
>                  <?  echo $form->input('note'.$i);?>
>
>                 </td>
>         <? $i= $i+1;   ?>
>         </tr>
>
>  <?php endforeach; ?>
> <td colspan="3"> <?php echo $form->end(__('Submit', true));?></td>
> <td align="left"><p>
>
>         </fieldset>
>
> </div>
> </table>
> </table>
> </div>
> </div>
>
> COMO HAGO PARA GUARDAR MULTIPLES REGISTROS, CUANDO GUARDO ME QUEDAN
> LOS DATOS DE LA MATERIA Y EL PROFESOR, DE 1 REGISTRO PERO SIN DATOS DE
> NOTA NI ALUMNO. Q TENGO Q HACER???

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

To unsubscribe from this group, send email to 
cake-php+unsubscribegooglegroups.com or reply to this email with the words 
"REMOVE ME" as the subject.

Reply via email to