Jaydeepsinh Jadeja Jaydeepsinh Jadeja - 11 months ago 63
PHP Question

How to redirect a page in CodeIgniter?

I want to redirect a page if some condition returns true. I have no idea how to do this. Can any one provide me with an example?

Or is there any way to accomplish this?

Answer Source

Use the redirect() function from the URL Helper.

EDIT: load the url helper:

if (condition == TRUE) {