Re: How do I redirect?
Your problem is you are redirecting to test controller when in fact you should be redirecting to tests controller.
$this->redirect(array('controller' => 'tests', 'action' => 'index'));
On Monday, March 19, 2012 7:56:09 AM UTC-7, glevine wrote:
Right, so in the example I was mainly just wanting to show that I was reaching those points in the code. Theoretically, if I remove the "print 'before redirect';" statement then I should never see "after redirect" but I should see "in the index" upon the new page load (since that is post redirect).--For some reason, I was still unable to redirect when I wasn't printing to the screen before the call to exit. However, I may have just been tired and didn't realize I still had a print before exit. So I'll try again and respond back with the results.Thanks
On Monday, March 19, 2012 7:56:28 AM UTC-4, euromark wrote:no you can't! or: you really shoudn'tyou should simply do everything before redirecting.theoretically, you can manually call exit() if you set the exit param to false on redirect.but to me this makes no sense.>> can we do some process after redirect.
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
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home