I have a addstudent.ctp file to add students
echo $this->Form->create('Student');
echo $this->Form->input('FirstName');
echo $this->Form->input('LastName');
echo $this->Form->end('Register');
echo $this->Form->create('Address',array('controller'=>'addresses','action'=>'addaddress'));
echo$this->Form->end('NextAdressDetails',array('controller'=>'addresses','action'=>'addaddress'));
after clicking on it is going to add method of StudentsController.it has to add student object to session and should redirect to same page.like this i can able to add as many students as possible ,so my problem is to how to add the multiple students into session whenever clicks on register button.
1 Answer