Welcome Guest, Not a member yet? Register   Sign In
controller functions best practice
#5

[eluser]ss_juit@yahoo.com[/eluser]
yes, you can create one function(index) and pass the branch name as the parameter to that function and act accordingly.

Code:
controller
--------------
class Branches extends CI_Controller{

function __construct(){
     parent::construct();
}

function index($branch_name){

     //your logic

}

}

call as url
---------------
Code:
<a href="&lt;?php echo site_url('branches/index/'.$branch_name);?&gt;">&lt;?php echo $branch_name;?&gt;</a>


Messages In This Thread
controller functions best practice - by El Forum - 04-08-2013, 03:32 AM
controller functions best practice - by El Forum - 04-08-2013, 03:49 AM
controller functions best practice - by El Forum - 04-08-2013, 04:37 AM
controller functions best practice - by El Forum - 04-08-2013, 04:45 AM
controller functions best practice - by El Forum - 04-08-2013, 07:13 AM
controller functions best practice - by El Forum - 04-11-2013, 05:35 AM



Theme © iAndrew 2016 - Forum software by © MyBB