Re: an add page redirects to other page holding some parameters

2012-03-01 Thread Stephen
Quick reply! Got a meeting in 2 minutes... Process Person::add() as normal, once you call $this->Person->save($this->data); call $id = $this->Person->id; (The id of the last inserted row) Then do $this->redirect(array('controller' => 'subordinates', 'action' => 'add', $id)); (/subordinates/add/)

an add page redirects to other page holding some parameters

2012-03-01 Thread driss bounouar
I have two models person and subordinate and I have the relationship person has many subordinate what I want to do is that when I add the person when I click the submit button I will be redirected to add subordinate to that exact person I don't want a combox to choose between people ?? How co