Welcome Guest, Not a member yet? Register   Sign In
Best way to handle redirects within the same controller?
#2

[eluser]theprodigy[/eluser]
I've always done basic redirect calls.

Using your example:
Code:
class Test extends CI_Controller
{
   function index()
   {
       // ...
   }

   function number_two()
   {
       // Do something then show the index again
       redirect('test/index');
   }
}

As for your 'edit' about form_validation errors, just make sure you only redirect if there are none.


Messages In This Thread
Best way to handle redirects within the same controller? - by El Forum - 07-06-2011, 02:11 PM



Theme © iAndrew 2016 - Forum software by © MyBB