If that's the case your problem are here "$this->input->post('submit')", that it gets validated as false.
Just do a double check and add die('Hello'); the first thing inside that if statement.
PHP Code:
function search(){
if($this->input->post('submit')){
die('Hello');
...
}
}
If you don't see "Hello"; Add var_dump($this->input->post('submit'));exit; before that if and see what you are getting.
ALSO: Your search() code have SQL injections. You should fix that ASAP!