문제

I am having trouble trying to pass an valuable after the user fail the authorization. I would like to pass $error to the welcome controller but not sure how. Please help. Thank you.

  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');
                }


        }

올바른 솔루션이 없습니다

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top