title: Undefined Variable error in View
body: <p>My controller is in  this question:
  <a href="https://stackoverflow.com/questions/13584783/how-to-add-pagination-to-this">how to add pagination to this</a></p>
  
  <p>But now, i'm getting undefined variable in my view,
  View has an input</p>
  
  <pre><code>&lt;input name='query'/&gt;
  </code></pre>
  
  <p>which i receive it in controller as,</p>
  
  <pre><code>$query = $this-&gt;input-&gt;get('query'); 
  </code></pre>
  
  <p>Now, i am trying to pass the same query string back into my view
  inside the link of pagination.</p>
  
  <pre><code>&lt;a href="&lt;php echo base_url(); ?&gt;main/search/query=&lt;?php echo $query; ?&gt;&amp;off=&lt;?php echo $off=5;"&gt;1&lt;/a&gt;
  </code></pre>
  
  <p><code>$off</code> works but not <code>$query</code>. But i'm NOT saving the <code>$query</code> to the database.
  so, i cant use <code>$data['query']</code> as well. totally confused.</p>