【发布时间】:2012-01-21 00:06:37
【问题描述】:
在用户授权失败后,我无法尝试传递有价值的东西。我想将 $error 传递给欢迎控制器,但不确定如何。请帮忙。谢谢你。
private function _user_check()
{
//after form validation, I pass username and password to the model
$this->load->model('user_query');
$result=$this->user_query->query($this->input->post('username'),$this->
input->post('password'));
if($result)
{
redirect('main');
}else{
// I am not sure how to pass this error message to my welcome controller
$data['error']='Please check your username or password';
redirect('welcome');
}
}
【问题讨论】:
标签: php codeigniter http-redirect