Possible Duplicate:
How to call controller function from view in codeigniter?
With codeigniter, I have a controller as in the following:
class myController extends CI_Controller{
function __constructor(){
parent::__constructor();
}
public function index(){
$this->load->view('myview');
}
public function myFn(){
echo "my controller is called";
}
}
and in the view m using a HTML form in the form action m calling the myFn by using the following link localhost/Codeignator/myController/myFn after doing so I got the following error!
The requested URL /CodeIgniter/myController/myFn was not found on this server
but when I use the link localhost/Codeignator/index.php/myController/myFn
I got the correct output!