title: Codeigniter: Passing form data from view to controller
body: <p>Which is right? notice in the second option, I'm passing the form values using the $_POST variable. Whereas the first option, I call and assign variables for each form field.</p>
  
  <p>I've seen this ...</p>
  
  <pre><code>&lt;validation code&gt; ....
  
  $todo = array(
        'name'=&gt;$this-&gt;input-&gt;post('title'),
        'description'=&gt;$this-&gt;input-&gt;post('description')
  );
  
  $this-&gt;Todo_model-&gt;add($todo); 
  </code></pre>
  
  <p>But I've also seen the following ...</p>
  
  <pre><code>$records['email']    = "trim|required|min_length[4]|xss_clean";
  ...
  ...    
  
  $this-&gt;validation-&gt;set_rules($records);
  
  if ($this-&gt;validation-&gt;run())
  {
     $this-&gt;account_model-&gt;saveAccountSettings("sam", $_POST);
     $this-&gt;session-&gt;set_flashdata('message', 'Done!');            
  
     redirect('account/settings');
  } else {
  ...
  } 
  </code></pre>