this is my view page code
<td><a href="<?php echo site_url("Customer/viewpatient/?id=".$id); ?>" ><button type="button" name="admit" class="btn btn-danger" data-toggle="modal" id="btnViewCust">Admit</button></a></td>
this is my controller function
public function viewpatient() { $data['id'] = $this->input->post('id'); echo $data['id']; }
Advertisement
Answer
Use this $this->input->get()
public function viewpatient() { $data['id'] = $this->input->get('id'); echo $data['id']; }