Undefined Variable error in View-Collection of common programming errors

My controller is in this question: how to add pagination to this

But now, i’m getting undefined variable in my view, View has an input


which i receive it in controller as,

$query = $this->input->get('query'); 

Now, i am trying to pass the same query string back into my view inside the link of pagination.

Originally posted 2013-11-09 22:57:17.