NewBie...Hwo to pass query string parameter from list view - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: NewBie...Hwo to pass query string parameter from list view (/showthread.php?tid=30152) |
NewBie...Hwo to pass query string parameter from list view - El Forum - 05-04-2010 [eluser]myjeep_2003[/eluser] I am trying to pass querystring parameter from listview to detail view... like this ... some wrong in my procedure... My view look slike this where it creates a link with $id <p> <?php foreach($query_show_plan_and_prepare_list as $row):?> <?php form_hidden('myid',$row->id);?> <p><h3><?php echo anchor('mycontent/show_plan_detail/'.$row->id, $row->Title);?></h3></p> <p class="info">posted: <?php echo $row->modified;?></p> <?php endforeach;?> </p> On clicking <p><h3><?php echo anchor('mypost/show_plan_detail/'.$row->id, $row->Title);?></h3></p> I want to pass the parameter(id) to my controller mypost/show_plan_detail function. Then I want to use the passed parameter(id) to write a query in Model.. what will show content Detail of that id.. NewBie...Hwo to pass query string parameter from list view - El Forum - 05-04-2010 [eluser]Ngulo[/eluser] hi,you should use uri helper , to extract $this->uri segment(); for example mysite.com/action/9 $this->uri->segment(3) returns 9 NewBie...Hwo to pass query string parameter from list view - El Forum - 05-05-2010 [eluser]myjeep_2003[/eluser] Hey thanks a million... that was sweet....victory..worked.... NewBie...Hwo to pass query string parameter from list view - El Forum - 05-05-2010 [eluser]Ngulo[/eluser] eheheh don't worry this is the basics,i also had to learn them |