title: In codeigniter i am send a php variable from view page to controller through the <a> tag, but i can't display value in controller page
body: <blockquote>
    <p>this is my view page code</p>
  </blockquote>
  
  <pre><code>&lt;td&gt;&lt;a href="&lt;?php echo site_url("Customer/viewpatient/?id=".$id); ?&gt;" &gt;&lt;button type="button" name="admit" class="btn btn-danger" data-toggle="modal" id="btnViewCust"&gt;Admit&lt;/button&gt;&lt;/a&gt;&lt;/td&gt;
  </code></pre>
  
  <blockquote>
    <p>this is my controller function</p>
  </blockquote>
  
  <pre><code>public function viewpatient()
  {
  
          $data['id'] = $this-&gt;input-&gt;post('id');
          echo $data['id'];
  
  }
  </code></pre>