title: load different views according to select option
body: <p>VIEW:
                          
                            Payment Method: </p>
  
  <pre><code>                        &lt;select name="payment" id="payment"&gt; 
                          &lt;option value=""&gt;  --- Select ---&lt;/option&gt;
                          &lt;option value="cash"&gt;Cash on Delivery&lt;/option&gt;
                          &lt;option value="online"&gt;Digital/Online Payment&lt;/option&gt;
  
  
                          &lt;/select&gt;
                        &lt;/label&gt;&lt;?php echo form_error('payment'); ?&gt;&lt;/td&gt;
                    &lt;/tr&gt;
  </code></pre>
  
  <p>CONTROLLER:</p>
  
  <pre><code>public function save_order()
  
  {
      $this-&gt;load-&gt;library('form_validation');
  
      $this-&gt;form_validation-&gt;set_rules('name', 'name', 'required|trim|max_length[50]');          
      $this-&gt;form_validation-&gt;set_rules('phone', 'phone', 'required|trim|is_numeric|min_length[9]');          
      $this-&gt;form_validation-&gt;set_rules('time', 'time', 'required');          
      $this-&gt;form_validation-&gt;set_rules('location', 'location', 'required');          
      $this-&gt;form_validation-&gt;set_rules('address', 'address', 'required|trim|xss_clean|max_length[300]');
      $this-&gt;form_validation-&gt;set_rules('payment', 'payment', 'required');
  
      $this-&gt;form_validation-&gt;set_error_delimiters('&lt;br /&gt;&lt;span class="error"&gt;', '&lt;/span&gt;');
  
      if ($this-&gt;form_validation-&gt;run() == TRUE &amp;&amp; ($payment = "cash"))
  </code></pre>
  
  <p>{
  $this->load->view('billing_view');
          else 
          {
              $this->load->view('billing_view2'); 
  }</p>
  
  <p>I am trying to load different pages according to the select options in the form and it doesn't seem to be working.
  Suggestions please?? </p>