[eluser]Miroslav Milic[/eluser]
I had the same problem.
Thing is that Input library is destroying $_GET array when enable_query_strings is set to false and that is the case with standard CI configuration.
If you want to use $this->input->get() and $this->input->get_post() you can extend Input library with this code:
Code:
class MY_Input extends CI_Input {
function MY_Input()
{
$CFG =& load_class('Config');
// Remeber old setting
$tmp = $CFG->item('enable_query_strings');
// Set the enable_query_string to true so Input lib will not destroy $_GET array
$CFG->set_item('enable_query_strings', TRUE);
// In this special case we need to manualy parse the get query
// (when using htaccess to hide index.php on some hosts)
if ($CFG->item('index_page') == '' && $CFG->item('uri_protocol') == 'QUERY_STRING') {
$get_array = array();
parse_str(parse_url($_SERVER['REQUEST_URI'], PHP_URL_QUERY), $get_array);
$_GET = $get_array;
}
// Initialize Input library
parent::CI_Input();
// Set the old setting back
$CFG->set_item('enable_query_strings', $tmp);
}
}