title: How to Resolve Page Redirect issue in Codeigniter
body: <p>When I click on href the dashboard page is loaded but the the location on the href is a different page.</p>
  
  <pre><code>&lt;li&gt;&lt;a href="&lt;?php echo base_url() ?&gt;folder/controller/function"&gt;Add supplier&lt;/a&gt;&lt;/li&gt;
  </code></pre>
  
  <p><strong>Controller</strong></p>
  
  <pre><code>public function add_supplier($id = null)
      {
          $this-&gt;tbl_supplier('supplier_id');
  
          if ($id) {//condition check
              $result = $this-&gt;global_model-&gt;get_by(array('supplier_id' =&gt; $id), true);
  
              if ($result) {
                  $data['supplier'] = $result;
              } else {
                  //msg
                  $type = 'error';
                  $message = 'Sorry, No Record Found!';
                  set_message($type, $message);
                  redirect('admin/purchase/manage_supplier');
              }
          }
  
          // view page
          $data['title'] = 'Add New Supplier';
          //$data['editor'] = $this-&gt;data;
          $data['subview'] = $this-&gt;load-&gt;view('admin/purchase/add_supplier', $data, true);
          $this-&gt;load-&gt;view('admin/_layout_main', $data);
      }
  </code></pre>