Yes try the $this->redirect($this->referer()); http://book.cakephp.org/1.2/view/430/referer
Thanks, Vijay On Mar 11, 10:01 am, romel javier gomez herrera <[email protected]> wrote: > try with this $this->redirect($this->referer()); > > El 10 de marzo de 2012 21:24, Brian Bowler <[email protected]> escribió: > > > > > > > > > So I have this function where the user can add the weight to materials and > > save them. However after the updateAll, $this->redirect doesn't work at all > > and the result shows up with a blank page with nothing in the source. In an > > ideal world I would have it redirect to a different page but at a minimum I > > would like it to go back to the page where they entered in the weights. > > > public function instructions($id = null) { > > $instructions = $this->Formula->findFormula($id); > > $count = count($instructions); > > $this->set(array('instructions' => $instructions, 'count' => > > $count, 'formulaId' => $id)); > > if(!empty($this->data)) { > > $count = count($this->request->data); > > for($i = 0; $i <= $count; $i++) { > > $this->Formula->updateAll( > > array('Formula.weight' => > > $this->request->data['Formula'][$i]['weight']), > > array('Formula.id' => > > $this->request->data['Formula'][$i]['id']) > > ); > > } > > } > > $this->redirect(array('controller' => 'instructions', 'action' => > > 'instructions', $id)); > > } > > > I have no idea what causes this. Any help is much appreciated, even if its > > just telling me where in the manual to read up on it. > > > -- > > Our newest site for the community: CakePHP Video Tutorials > >http://tv.cakephp.org > > Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help > > others with their CakePHP related questions. > > > To unsubscribe from this group, send email to > > [email protected] For more options, visit this group > > athttp://groups.google.com/group/cake-php -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php
