php - How to send Data form view to controller through URL in codeigniter and how i get data in controller -
how send data form view controller through url in codeigniter , how data in controller?
<div class="col-md-3 col-md-3-text"> <div class="classwithpad"><img src="<?php echo base_url(); echo 'assets/img/'; echo $title[$i]->image; ?>"/> <?php $id = $title[$i]->category_id; ?> <div class="title_banner"><a href="<?php echo site_url('welcome/category','' ) ?>" class="mhover"><?php echo $title[$i]->category_name; ?></a></div> </div> </div>
send this
you have use $_get[] method of php:
<a href="<?php echo base_url()?>your_controller/your_function?id=1">my data</a>
this redirect controller
had function
, within your_function have use $_get['id']
function your_function() { $id = $this->input->get('id'); }
Comments
Post a Comment