title: Disallowed Key Characters in Codeigniter
body: <p>I have studying about disallowed key characters error in codeigntier. But, I think I dont have those characters in my form. May be I may be mistaken. </p>
  
  <p><strong>My Form</strong></p>
  
  <pre><code>    &lt;div class="container_part"&gt;
  
      &lt;div class="container"&gt;
  
          &lt;div class="row-fluid  maincontainer"&gt;
  
              &lt;div class="mycontainer"&gt;
                  &lt;?php echo form_open('bookings/customerdetails'); ?&gt;
  
                  &lt;div class="row-fluid"&gt;
  
                      &lt;div class="span12 mainheading"&gt;
  
                          &lt;hr&gt;
  
                      &lt;/div&gt;
  
                      &lt;div class="row-fluid"&gt;
  
                          &lt;div class="span6"&gt;
  
                              &lt;div style="padding: 20px;"&gt;
  
                                  &lt;div&gt;
  
                                      &lt;select name="booking_form_customer_initial"&gt;
  
                                          &lt;option value="Mr."&gt;Mr.&lt;/option&gt;
                                          &lt;option value="Mrs."&gt;Mrs.&lt;/option&gt;
                                          &lt;option value="Ms."&gt;Ms.&lt;/option&gt;
                                      &lt;/select&gt;
  
                                  &lt;/div&gt;
  
                                  &lt;div&gt;
  
                                      &lt;input type="text" name="booking_form_customer_name" placeholder="Enter Full Name" class="span12" required="required" /&gt;
  
                                  &lt;/div&gt;
  
                                  &lt;div&gt;
  
                                      &lt;input type="text" name="booking_form_customer_phone" placeholder="Enter Phone Number" class="span12" required="required" /&gt;
  
                                  &lt;/div&gt;
  
                                  &lt;div&gt;
  
                                      &lt;input type="email" name="booking_form_customer_email" placeholder="Enter Email" class="span12" required="required" /&gt;
  
                                  &lt;/div&gt;
  
                              &lt;/div&gt;
                          &lt;/div&gt;
  
                          &lt;div class="span6"&gt;
  
                              &lt;div class="control-group select optional booking_form_pick_up_method"&gt;
                                  &lt;label class="select optional control-label" for="booking_form_pick_up_method"&gt;Delivery method&lt;/label&gt;
                                  &lt;div class="controls"&gt;
                                      &lt;select class="select optional form-refesher" id="booking_form_pick_up_method" name="booking_form_pick_up_method" required="required"&gt;
                                          &lt;option value=""&gt;Select Delivery method&lt;/option&gt;
                                          &lt;option value="in_store"&gt;self_pick_up&lt;/option&gt;
                                          &lt;option value="courier"&gt;courier&lt;/option&gt;
                                      &lt;/select&gt;
                                  &lt;/div&gt;
                              &lt;/div&gt;
                              &lt;div data-observe="#booking_form_pick_up_method" data-visible-when="in_store" style="display: none"&gt;
                                  &lt;div class="control-group select optional booking_form_pick_up_location"&gt;
                                      &lt;label class="select optional control-label" for="booking_form_pick_up_location"&gt;Pick up location&lt;/label&gt;
                                      &lt;div class="controls"&gt;
                                          &lt;select class="select optional form-refesher" id="booking_form_pick_up_location" name="booking_form[pick_up_location]"&gt;
                                              &lt;option value="1"&gt;Tsim Sha Tsui&lt;/option&gt;
                                          &lt;/select&gt;
                                      &lt;/div&gt;
                                  &lt;/div&gt;
                              &lt;/div&gt;
                              &lt;div data-observe="#booking_form_pick_up_method" data-visible-when="courier" style="display: none"&gt;
                                  &lt;div class="control-group string optional booking_form_pick_up_courier_name"&gt;
                                      &lt;label class="string optional control-label" for="booking_form_pick_up_courier_name"&gt;Contact Person&lt;/label&gt;
                                      &lt;div class="controls"&gt;
                                          &lt;input class="string optional" id="booking_form_pick_up_courier_name" name="booking_form[pick_up_courier_name]" type="text" value="" /&gt;
                                      &lt;/div&gt;
                                  &lt;/div&gt;
                                  &lt;div class="control-group string optional booking_form_pick_up_courier_addr"&gt;
                                      &lt;label class="string optional control-label" for="booking_form_pick_up_courier_addr"&gt;Delivery Address&lt;/label&gt;
                                      &lt;div class="controls"&gt;
                                          &lt;input class="string optional" id="booking_form_pick_up_courier_addr" name="booking_form[pick_up_courier_addr]"  type="text" value="" /&gt;
                                      &lt;/div&gt;
                                  &lt;/div&gt;
                                  &lt;div class="control-group tel optional booking_form_pick_up_courier_phone"&gt;
                                      &lt;label class="tel optional control-label" for="booking_form_pick_up_courier_phone"&gt;Contact Phone&lt;/label&gt;
                                      &lt;div class="controls"&gt;
                                          &lt;input class="string tel optional" id="booking_form_pick_up_courier_phone" name="booking_form[pick_up_courier_phone]"  type="tel" value="" /&gt;
                                      &lt;/div&gt;
                                  &lt;/div&gt;
                              &lt;/div&gt;
  
                              &lt;div class="control-group select optional booking_form_drop_off_method"&gt;
                                  &lt;label class="select optional control-label" for="booking_form_drop_off_method"&gt;Return Method&lt;/label&gt;
                                  &lt;div class="controls"&gt;
                                      &lt;select class="select optional form-refesher" id="booking_form_drop_off_method" name="booking_form_drop_off_method" required="required"&gt;
                                          &lt;option value=""&gt;Select Return method&lt;/option&gt;
                                          &lt;option value="in_store"&gt;self_drop_off&lt;/option&gt;
                                          &lt;option value="courier"&gt;courier&lt;/option&gt;
                                      &lt;/select&gt;
                                  &lt;/div&gt;
                              &lt;/div&gt;
                              &lt;div data-observe="#booking_form_drop_off_method" data-visible-when="in_store" style="display: none"&gt;
                                  &lt;div class="control-group select optional booking_form_drop_off_location"&gt;
                                      &lt;label class="select optional control-label" for="booking_form_drop_off_location"&gt;Drop off location&lt;/label&gt;
                                      &lt;div class="controls"&gt;
                                          &lt;select class="select optional form-refesher" id="booking_form_drop_off_location" name="booking_form[drop_off_location]"&gt;
                                              &lt;option value=""&gt;&lt;/option&gt;
                                              &lt;option value="1"&gt;Tsim Sha Tsui&lt;/option&gt;
                                          &lt;/select&gt;
                                      &lt;/div&gt;
                                  &lt;/div&gt;
                              &lt;/div&gt;
                              &lt;div data-observe="#booking_form_drop_off_method" data-visible-when="courier" style="display: none"&gt;
                                  &lt;div class="control-group string optional booking_form_drop_off_courier_name"&gt;
                                      &lt;label class="string optional control-label" for="booking_form_drop_off_courier_name"&gt;Contact  Person&lt;/label&gt;
                                      &lt;div class="controls"&gt;
                                          &lt;input class="string optional" id="booking_form_drop_off_courier_name" name="booking_form[drop_off_courier_name]" type="text" value="" /&gt;
                                      &lt;/div&gt;
                                  &lt;/div&gt;
                                  &lt;div class="control-group string optional booking_form_drop_off_courier_addr"&gt;
                                      &lt;label class="string optional control-label" for="booking_form_drop_off_courier_addr"&gt;Return Address&lt;/label&gt;
                                      &lt;div class="controls"&gt;
                                          &lt;input class="string optional" id="booking_form_drop_off_courier_addr" name="booking_form[drop_off_courier_addr]" type="text" value="" /&gt;
                                      &lt;/div&gt;
                                  &lt;/div&gt;
                                  &lt;div class="control-group tel optional booking_form_drop_off_courier_phone"&gt;
                                      &lt;label class="tel optional control-label" for="booking_form_drop_off_courier_phone"&gt;Contact Phone&lt;/label&gt;
                                      &lt;div class="controls"&gt;
                                          &lt;input class="string tel optional" id="booking_form_drop_off_courier_phone" name="booking_form[drop_off_courier_phone]" type="tel" value="" /&gt;
                                      &lt;/div&gt;
                                  &lt;/div&gt;
                              &lt;/div&gt;
  
                              &lt;div&gt;
                                  &lt;div&gt;
                                      Customer Remarks
                                  &lt;/div&gt;
                                  &lt;div class="control-group string optional booking_form_remarks"&gt;
                                      &lt;div class="controls"&gt;
                                          &lt;textarea class="string optional input-large span8" id="booking_form_remarks" name="booking_form_remarks]" &gt;&lt;/textarea&gt;
                                      &lt;/div&gt;                              &lt;/div&gt;
                              &lt;/div&gt;
  
                          &lt;/div&gt;
  
                      &lt;/div&gt;
                      &lt;div class="clearfix"&gt;&lt;/div&gt;
  
                      &lt;div class="clearfix"&gt;&lt;/div&gt;
                      &lt;div class="row-fluid" id="transaction-details" style="position: relative;"&gt;
                          &lt;div style="padding:25px;"&gt;
  
                              &lt;div id="cart_content"&gt;
                                  &lt;?php echo $this-&gt;view('shop/cart.php'); ?&gt;
                              &lt;/div&gt;
  
  
                              &lt;input type="submit" name="customer_details_submit_btn" value="Next" class="btn btn-primary" /&gt;
  
                          &lt;/div&gt;
                      &lt;/div&gt;
  
  
  
                  &lt;/div&gt;
  
  
  
  
                  &lt;?php echo form_close(); ?&gt;
              &lt;/div&gt;
  
          &lt;/div&gt;
  
      &lt;/div&gt;
  
  &lt;/div&gt;
  </code></pre>
  
  <p><hr/><strong>My controller controlling the validation is below.</strong></p>
  
  <pre><code>function customerdetails() {
  
  
      $customer_v_rules = array(
          array(
              'field' =&gt; 'booking_form_customer_name',
              'label' =&gt; 'Full Name',
              'rules' =&gt; 'required'
          ),
          array(
              'field' =&gt; 'booking_form_customer_phone',
              'label' =&gt; 'Phone',
              'rules' =&gt; 'required'
          ),
          array(
              'field' =&gt; 'booking_form_customer_email',
              'label' =&gt; 'Email',
              'rules' =&gt; 'required|valid_email'
          ),
          array(
              'field' =&gt; 'booking_form_pick_up_method',
              'label' =&gt; 'Delivery Method',
              'rules' =&gt; 'required'
          ),
          array(
              'field' =&gt; 'booking_form_pick_up_method',
              'label' =&gt; 'Delivery Method',
              'rules' =&gt; 'required'
          ),
          array(
              'field' =&gt; 'booking_form_drop_off_method',
              'label' =&gt; 'Return Method',
              'rules' =&gt; 'required'
          )
      );
  
      $this-&gt;form_validation-&gt;set_rules($customer_v_rules);
  
  
      if ($this-&gt;form_validation-&gt;run()) {
  
          $name = $this-&gt;input-&gt;$this-&gt;input-&gt;post('booking_form_customer_name');
          $phone = $this-&gt;input-&gt;post('booking_form_customer_phone');
          $email = $this-&gt;input-&gt;post('booking_form_customer_email');
  
          $remarks = $this-&gt;input-&gt;post('booking_form_remarks');
  
          echo 'OK';
      } else {
  
          $this-&gt;customer_details_initial_task();
  
  //$this-&gt;show_products_session_array();
  
          $data = array('page_title' =&gt; 'Customer Section');
  
          $meta = array('page_title' =&gt; 'Customer Section');
          $this-&gt;template-&gt;write_view('meta', 'templates/wiyo/partials/meta', $meta, TRUE);
          $this-&gt;template-&gt;write_view('header', 'templates/wiyo/partials/header', $data, TRUE);
          $this-&gt;template-&gt;write_view('content', 'customerdetails', $data, TRUE);
          $this-&gt;template-&gt;render();
      }
  
  
  //$this -&gt; output -&gt; enable_profiler(TRUE);
  }
  </code></pre>
  
  <p><strong>My Config file</strong> </p>
  
  <pre><code>$config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-';
  $config['uri_allowed_chars'] = 'a-z?';    
  $config['sess_cookie_name'] = 'ci_session';
  $config['sess_expiration'] = 7200;
  $config['sess_encrypt_cookie'] = TRUE;
  $config['sess_use_database'] = TRUE;
  $config['sess_table_name'] = 'ci_sessions';
  $config['sess_match_ip'] = FALSE;
  $config['sess_match_useragent'] = TRUE;
  $config['sess_time_to_update'] = 300;
  </code></pre>
  
  <p><hr/>
  Helping hands are appreciated.</p>