title: How to pass a data with redirect in codeigniter
body: <p>In my controller i used this way. i want to pass a variable data to my index function of the controller through redirect</p>
  
  <pre><code>$in=1;
  redirect(base_url()."home/index/".$in);
  </code></pre>
  
  <p>and my index function is</p>
  
  <pre><code>function index($in)
  {
      if($in==1)
      {
  
      }
  }
  </code></pre>
  
  <p>But I'm getting some errors like undefined variables.<br>
  How can i solve this?</p>