@lew
You can redirect a page in CodeIgniter using the redirect()
function provided by CodeIgniter's URL helper. Here's an example of how you can do it:
1
|
$this->load->helper('url'); |
1
|
redirect('controller/method'); |
In this example, controller
is the name of the controller and method
is the name of the method you want to redirect to. You can also redirect to a specific URL:
1
|
redirect('http://example.com'); |
1
|
redirect(); |
This will redirect the user back to the previous page they were on.
That's it! You have successfully redirected a page in CodeIgniter using the redirect()
function.