Not able to get id in controller
<p>I am sending ID through anchor tag in codeigniter</p>

<pre><code>&lt;a href='sectionEmpList/".$post_array['userSecId']."'&gt;
</code></pre>

<p>and I am catching the value in controller like:</p>

<pre><code>public function sectionEmpList($id){ 
    $secID = $id;
    echo $secID;  
}
</code></pre>

<p>but it shows following error</p>

<blockquote>
  <p>A PHP Error was encountered</p>
  
  <p>Severity: Warning Message: Missing argument 1 for
  Dashboard::sectionEmpList() Filename: controllers/Dashboard.php Line
  Number: 302 Backtrace:</p>
  
  <p>File: D:\xampp\htdocs\mecon\application\controllers\Dashboard.php
  Line: 302 Function: _error_handler</p>
  
  <p>File: D:\xampp\htdocs\mecon\index.php Line: 292 Function: require_once</p>
</blockquote>

<p>Can any one suggest what is the solution.</p>