What should be happening: user navigates to URI, routes.php grabs the State and sends it to the controller, the controller returns some info from a database query. Pretty basic stuff.
The problem: the URI isn't passing the variable to the controller. I'm being told
Missing argument 1 for States::state_summary
I can set a default for the function argument, ie. ($st='Alabama') and everything works smoothly.
I don't even see how this is possible. Maybe at least tell me what I need to test to track down the bug.
URI:
http://example.com/index.php/states/Alabama
routes.php:
$route['states/(.*)'] = "states/state_summary/$1";
States controller:
...
function state_summary($st)
{
// DB query
// Return data
}
...