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
<input name='query'/>
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.
<a href="<php echo base_url(); ?>main/search/query=<?php echo $query; ?>&off=<?php echo $off=5;">1</a>
$off
works but not $query
. But i'm NOT saving the $query
to the database.
so, i cant use $data['query']
as well. totally confused.