title: Codeigniter - passing form input information to the controller and displaying it on next view
body: <p>This question is possibly a duplicate but I cannot find the exact answer I am looking for.</p>
  
  <p>I have two forms and two controllers.</p>
  
  <p>I want to input data into the fist controllers view. on that page submit the data tot he second controller and display it on that controllers view.</p>
  
  <p>Now I have tried to insert the form input data in an array in my controller and then access it as a normal variable in the view but without luck.</p>
  
  <p><strong>My Controller for first form</strong></p>
  
  <pre><code>function new_order_details() 
    {
        $this-&gt;load-&gt;view('sales/new_order_details');
    }
  </code></pre>
  
  <p><strong>My input form view: new_order_details'</strong></p>
  
  <pre><code>&lt;form id="sales_order_details" action="/sales/new_blank_order_lines" method="post"&gt;
  &lt;input type="text" id="customer" /&gt;
  &lt;input type="submit" name="blank_order" id="blank_order" value="Continue"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p><strong>My Controller for second form</strong></p>
  
  <pre><code>function new_blank_order_lines() 
    {
       $data = array(
      'customer' =&gt;$this-&gt;input-&gt;post('customer')
         );
        $this-&gt;load-&gt;view('sales/new_blank_order_lines',$data);
    }
  </code></pre>
  
  <p><strong>and my view where I want to display data</strong></p>
  
  <pre><code>&lt;?php echo "--".$customer."--"; ?&gt;
  </code></pre>
  
  <p>The output of the above is that the variable $customer is empty.</p>
  
  <p>Any ideas would be appreciated.</p>
  
  <p>Thanks and Regards.</p>