CI 묻고 답하기

제목 Disallowed Key Characters. 에러 발생...
글쓴이 닥스훈트 작성시각 2013/06/13 18:28:31
댓글 : 2 추천 : 0 스크랩 : 0 조회수 : 20493   RSS
 그렇게 복잡하지도 않는 코드인데...

일단

뷰는 이렇습니다.

<!DOCTYPE html>
<html>
 <head>
  <meta http-equiv="Content-Type"  content="text/html; charset=UTF-8" />
  <link rel="stylesheet" type="text/css" href="/asset/css/bootstrap.min.css" />
  <title><?= $title; ?></title>
 </head>
  <body>
   <?
   $this->load->helper('form'); //form헬퍼 로딩
    
   $attr = array('id'=>'slick-login', 'class'=>'form-inline'); //id와 같은 속성은 연관배열로 만들어서 전송
   echo form_open('authentication/login_process', $attr);
   $attr = array('name'=>'userid', 'placeholder'=>'userID', 'class'=>'input-small');
   echo form_input($attr);
   $attr = array('name'=>'userpassword', 'placeholder'=>'Password', 'class'=>'input-small');
   echo form_password($attr);
   $attr = array('class'=>'btn');
   echo form_submit('$attr','LogIn');
   ?>
  </body>
</html>
콘트롤러는..

public function login_process(){

 $user_id = $this->input->post('userid');
 $user_password = md5($this->input->post('userpassword'));
    
 $result = $this->memberlogin_model->login_mem($user_id, $user_password);
 if ($result) {
  $this->welcome();
 } else{
  $this->index();
 }
}

버튼을 누르면 자꾸 

Disallowed Key Characters.

에러가 뜨는데 원인을 못찾겠네요..

 다음글 CSRF 사용시 AJAX 사용 이게 맞나요? (2)
 이전글 ajax질문이요~ (4)

댓글

변종원(웅파) / 2013/06/13 18:31:40 / 추천 0
일단 http://codeigniter-kr.org/qna/view/4343/page/1 이걸로 원인 찾아보세요.
닥스훈트 / 2013/06/13 19:31:10 / 추천 0
 웅파 // 아.. 놔... 뷰 버튼 출력 부분에

echo form_submit('$attr','LogIn');

여기에 변수에다 따옴표 찍어놨었군요.....