function Home()
{
parent::Public_Controller();
$this->load->library('survey_form_processing');
//Load Helpers
$this->load->helper('form');
$this->load->library('Paypal_Lib');
$this->lang->load('userlib');
$this->load->model('home_model');
if($foo == true){
redirect('home');
}
}
This is my construct of the “Home” controller. If a value == true, how can I redirect to the index function? When I try this I get an error…
Is it possible to redirect to the index function?
P.S. I’m a php/CI noob!
Based on the information you provided, I’d say that you’re stuck in an infinite redirection loop :
You may have some solutions :
indexand in that case don’t redirect (you can use the functionrouter->fetch_method()The easiest would probably to change your condition.
From
To
So that if CodeIgniter is trying to reach the Index it won’t be redirected again.
(I don’t have a php server here so I can’t check the exact value). But the idea is here.