How do I append multiple segments to an anchor - 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: How do I append multiple segments to an anchor (/showthread.php?tid=51094) |
How do I append multiple segments to an anchor - El Forum - 04-20-2012 [eluser]vincej[/eluser] Hi ! I have created an anchor which looks like: Code: anchor('admin/pos/open_orders/'.$customerid.'/'.$list['pickupdate'] , $list['firstname']." ". $list['lastname']) it creates a url like this : Code: <a href="http://localhost/countrylane/index.php/admin/pos/open_orders/5/1343800800"> I want to pass the customer id and pickupdate to to my model for inclusion in a query - via the controller of course. CONTROLLER: Code: function open_orders($customerid=""){ MODEL: Code: function open_orders($customerid){ I expect that I need to use the uri->segment function. I'd really appreciate some advice how how to do this - as my attempts so far have all crashed and burned ! Many thanks ! How do I append multiple segments to an anchor - El Forum - 04-20-2012 [eluser]vincej[/eluser] Panic over - I Have solved it, just me being stupid ! for others the answer is: Code: $customerid= $this->uri->segment(4); |