title: CodeIgniter $this->input->post() array
body: <p>I am very curious on why when I print_r($this->input->post()), it prints an array and then has 1 after it.
  This is what it prints:</p>
  
  <pre><code>Array ( [username] =&gt; lilmousiee [birthdate] =&gt; 1992-04-26 [gender] =&gt; 1 [password] =&gt; 66lah66lab [password2] =&gt; 66lah66lab [pin] =&gt; 2323 [pin2] =&gt; 2323 [email] =&gt; mouseywings@live.com [email2] =&gt; mouseywings@live.com [region] =&gt; 1 [dtype] =&gt; air [dname] =&gt; Mattyco [dgender] =&gt; 1 [terms] =&gt; [recaptcha_challenge_field] =&gt; 03AHJ_VutHNI6hK3M_trpE-n4Qr9V5wWSH10p8hmQjrYVLeWf65ylIDva5XdH78uGED5KCsMx8tp3FHZ6p1xTllyrdSP7nEbnSILQ9CDqrxoD2pit5o9T9Cowy06_O6XLLM22fvH_5ICqoYrmI-o-P8dGCal0fNKuSohgvFU03FmgbhuYTDjJ_xUA [recaptcha_response_field] =&gt; asdfsadf [submit] =&gt; Register [search] =&gt; [type] =&gt; usersitems ) 1
  </code></pre>
  
  <p>Why is it printing that "1" after the array? I do not have one even typed... And there is no input field that does a value of 1 after the register button... And what exactly is the "search" and "type" keys?</p>
  
  <p>The last part of my HTML:</p>
  
  <pre><code>    &lt;legend&gt;Terms of Use&lt;/legend&gt;
      &lt;div id="terms"&gt;
          &lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris vitae turpis ut sem tristique luctus. Sed tincidunt consequat tristique. Mauris laoreet vestibulum aliquam. Ut enim tortor, aliquet at faucibus sed, venenatis eget tellus. Praesent velit nisl, bibendum a dignissim nec, hendrerit non lacus. Fusce dapibus pharetra molestie. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.&lt;/p&gt;
          &lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris vitae turpis ut sem tristique luctus. Sed tincidunt consequat tristique. Mauris laoreet vestibulum aliquam. Ut enim tortor, aliquet at faucibus sed, venenatis eget tellus. Praesent velit nisl, bibendum a dignissim nec, hendrerit non lacus. Fusce dapibus pharetra molestie. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.&lt;/p&gt;
          &lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris vitae turpis ut sem tristique luctus. Sed tincidunt consequat tristique. Mauris laoreet vestibulum aliquam. Ut enim tortor, aliquet at faucibus sed, venenatis eget tellus. Praesent velit nisl, bibendum a dignissim nec, hendrerit non lacus. Fusce dapibus pharetra molestie. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.&lt;/p&gt;
          &lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris vitae turpis ut sem tristique luctus. Sed tincidunt consequat tristique. Mauris laoreet vestibulum aliquam. Ut enim tortor, aliquet at faucibus sed, venenatis eget tellus. Praesent velit nisl, bibendum a dignissim nec, hendrerit non lacus. Fusce dapibus pharetra molestie. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.&lt;/p&gt;
      &lt;/div&gt;
      &lt;?php echo form_checkbox(array('name' =&gt; 'terms')); ?&gt; Accept Terms of Use
      &lt;div class="row clearfix"&gt;
          &lt;?php
            echo recaptcha_get_html($public_key);
          ?&gt;
      &lt;/div&gt;
  &lt;/fieldset&gt;
  &lt;?php echo print_r($array); ?&gt;
  
  &lt;div class="row clearfix"&gt;&lt;?php echo form_submit('submit', 'Register'); ?&gt;&lt;/div&gt;
  &lt;? echo form_close(); ?&gt;
  </code></pre>
  
  <p>I'm just having trouble passing $this->input->post() array into a validation function. Here is MY_Form_validation.php in my libraries folder:</p>
  
  <pre><code>class MY_Form_validation extends CI_Form_validation {
      private $post;
  
      public function __construct($params = array()) {
          foreach($params as $param) {
          parent::__construct($param['config']);
  $this-&gt;post = $param['post'];
          }
  
      }
  }
  </code></pre>
  
  <p>Is there a reason that "1" is being printed as the $this->post value... When it should hold the key and values of the array?
  This is how I'm passing the parameters:</p>
  
  <pre><code>$this-&gt;load-&gt;library('MY_Form_validation', array('config' =&gt; '', 'post' =&gt; $this-&gt;input-&gt;post()));
  </code></pre>
  
  <p>But when I put print_r($this->post), it only prints "1"..</p>