You have this code in your controller:
PHP Code:
$code = $this->input->post('code');
if ($this->$code() === 'pass_word')
If you refer to $this-> .... it can either be a variable that has been declared for the class you're working in (the controller for instance), or a method ( = function) inside that class.
If it's a class level variable, it's $this->code. If it's a class level method, it's $this->code(). In both cases, $this->
$code is wrong.
I think you simply want to check if the variable $code is equal to the literal string 'pass_word'. So it should be:
PHP Code:
$code = $this->input->post('code');
if ($code === 'pass_word')