I am trying to the code
function validate(){
$this->load->library('session');
$this->load->model('inventory/inventoryModel');
$result = $this->inventoryModel->validateUser();
if($result == 1){
$data = array(
'username' => $this->input->post('username'),
'is_loged_in' => TRUE
);
$this->session->set_userdata($data);
}
else{
$this->index();
redirect('inventory/validate');
}
}
and getting the error in chrome "This web page has a redirect loop"
what is solution?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…