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?
Use the redirect()
function from the URL Helper.
EDIT: load the url helper:
$this->load->helper('url');
if (condition == TRUE) {
redirect('new_page');
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With