Welcome Guest, Not a member yet? Register   Sign In
I need help with the CodeIgniter routes...
#3

in routes:

PHP Code:
$route['produto/(:num)/(:any)'] = 'produto_controller/show/$1/$2'

in controller:

PHP Code:
public function show($id NULL$title NULL) {
  if(!empty($id)) {

  } elseif(!empty($this->input->get('id')) && !empty($this->input->get('title')) {

  }



Honestly though, you shouldn't need to search by the title if you have the ID.
Codeigniter is simply one of the tools you need to learn to be a successful developer. Always add more tools to your coding arsenal!
Reply


Messages In This Thread
RE: I need help with the CodeIgniter routes... - by albertleao - 11-20-2015, 07:29 AM



Theme © iAndrew 2016 - Forum software by © MyBB