[eluser]spyridonas[/eluser]
Is it possible? i have a search and the result url is "mysite/find" but i want the url to be "mysite/find/value" (where value whatever i put inside the input box) what i have so far is :
Code:
$route['shop/find/(:any)']= "shop/find/$1";
inside my routes , my find() function inside controller
Code:
function find($findV)
{
$findV=$this->input->post('findSlug');
$this->load->model('shopFront/find');
$this->load->model('currency');
$this->load->model('shopFront/calculate');
$this->load->model('shop/proccess');
$data = $this->commondatashop->general();
$inputSlug = $this->input->post('findSlug');
$data['tofind'] = $inputSlug;
$data['cartInfo'] = $this->shopcart;
$data['Currency'] = $this->currency;
$data['Calculate'] = $this->calculate;
$data['Proccess'] = $this->proccess;
$data['title'] = "1.4.U Shop | Find";
$finder = $this->find;
$data['finderservice'] = $finder;
$data['user_id'] = $this->session->userdata('user_id');
$data['user_name'] = $this->session->userdata('user_name');
$this->load->view('shop/top/topNew',$data);
$this->load->view('shop/content/find',$data);
//footer
$curravailable = $this->calculate->getCurrencies();
if ( $curravailable !== false )
{
$data['currencies'] = $curravailable;
}
else
{
$data['currencies'] = 'none';
}
$this->load->view('shop/footer',$data);
, the post part on the header , which is
Code:
<?php echo form_open('shop/find/','find'); ?>
<input type="submit" name="find" value="" />
<input type="text" name="findSlug" />
<?php echo form_close(); ?>
this and finally the find.php which is the viewer. If i modify my viewer to search manually based on the 3rd segment then the search does happen , but i can't make the POST variable to go in the url