Welcome Guest, Not a member yet? Register   Sign In
404 issue with existing function
#6

[eluser]CroNiX[/eluser]
Try passing the id to the function.
Code:
$route['item/(:any)'] = 'items/details/$1';

Which can also be accessed (if you do this) as a parameter to your details() method.
Code:
public function details($id = FALSE)
{
  if ($id !== FALSE)  //default of FALSE, will be string if present
  {
     $id = (int)$id;  //change id from string to int
     //lookup $id, etc...
  }
}


Messages In This Thread
404 issue with existing function - by El Forum - 02-26-2012, 08:10 PM
404 issue with existing function - by El Forum - 02-26-2012, 08:40 PM
404 issue with existing function - by El Forum - 02-26-2012, 09:17 PM
404 issue with existing function - by El Forum - 02-27-2012, 10:03 AM
404 issue with existing function - by El Forum - 02-27-2012, 10:40 AM
404 issue with existing function - by El Forum - 02-27-2012, 10:47 AM



Theme © iAndrew 2016 - Forum software by © MyBB