[eluser]titoneo[/eluser]
IF YOU WANT JUMP TO ANOTHER PAGE:
suppose the name of your controller is Mytargetcontroller:
Code:
<?php
class Mytargetcontroller extends Controller{
function action1(){
//do something here if you want
$this->load->view("view1");
}
function action2($param){
//do something here if you want
$this->load->view("view2");
}
}
And in your view1.php have something like this:
Code:
.....
<a href="/mytargetcontroller/action2/xxx">more here</a>
.....
Analize the href url inside 'a':
mytargetcontroller -> is the name of your controller
action2 -> is the name of your method
xxx-> is the first param of your method
And you can put more params if you want:
Code:
<a href="/mysimplecontroller/action2/xxx/yyy/zzz">more here</a>
with this modification in the controller:
Code:
function action2($param1, $param2, $param3){
//do something here if you want
$this->load->view("view2");
}
IF YOU WANT MAKE AJAX REQUEST:
Replace # and insert / in order to separate the params when you do the request:
Code:
<a href="/mytargetcontroller/action2#params..">more here</a> //no
<a href="/mytargetcontroller/action2/param1/param2/..."> //yes
or do with post method and receive data like this in the controller (the controller will not receive url params!):
Code:
function action2(){
//do something here if you want
$param1 = $this->input->post("param1");
$this->load->view("view2");
}