[eluser]ping timeout[/eluser]
Hello,
I would like to know how I can change the error message for a function that needs and argument.
I have something like this:
the controller: menu
function in controller: category
argument for function: category-name
The URL is index.php/menu/category/category-name but if someone changes the URL to something like index.php/menu/category// it gives an ugly warning, instead I would like to redirect that user to index.
Code:
function category($link)
{
if(isset($link))
{
$this->load->library('form_validation');
if($this->form_validation->alpha_dash($link))
return $this->_category($link);
return $this->load->view('404');
}
return $this->index();
}