CodeIgniter Forums
Redirection problem in codeigniter - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Redirection problem in codeigniter (/showthread.php?tid=51009)



Redirection problem in codeigniter - El Forum - 04-17-2012

[eluser]Unknown[/eluser]
Hi,


When i add/edit/delete a record,records are added/updated/deleted but the page cannot be redirect to the home page.

I am using the code is

"redirect('emm/index');"
and
"redirect('emm/index','refresh');"

Both the codes was not working in the production server.

But these codes are working fine in my local server.

If any one knows the solution.Let me know.




Redirection problem in codeigniter - El Forum - 04-17-2012

[eluser]Mauricio de Abreu Antunes[/eluser]
Try to echo something before this redirect.
Like:
Code:
echo 'Test'; exit;
redirect('page', refresh);

When your redirect a page that is in the same controller, you can call the controller.
Like:
Code:
$this->index();