passing two parameters in index function using codeigniter -
i want pass 2 parameters in index function using codeigniter giving me error don't know why giving me error. here controller
function index($one = null,$two = null) { $data['title'] = "product page "; $this->load->view('home/header/header',$data); $this->load->view('home/css/css'); $this->load->view('home/navbar/navbar2'); $this->load->view('products/product'); $this->load->view('home/footer/footer'); $this->load->view('home/js/js'); }
here routes setting
$route['product/(:any)'] = 'product/index/$1';
when set index function in 1 parameter working fine not working 2 parameters.
you can try this, working
$route['product/(.*)/(.*)']='product/index/$1/$2';
Comments
Post a Comment