input->get('var_name') |
[eluser]ELRafael[/eluser]
Hy Guys, My view. It's a simple search form current_url() = http://site.local/news/index Code: <?php echo form_open( current_url(), 'method="get"' ); ?> My Controller (news, function index()) Code: $search_term = $this->input->get('search_term'); Result: Always bool(false) The url "submited" http://site.local/news/index?ci_csrf_tok...Acentuação&..... My config.php Code: $config['uri_protocol'] = "AUTO"; I'm using CodeIgniter 2.0 under MAMP enviroment Can anyone help me? Before any anwser, I know if I change the form's method to post and try to get the value using $this->input->post('search_term') will work fine. But I really wanna use GET method, not POST. I still belive that POST method is for CHANGING ACTIONS (new user, edit data, ....) Thanks a lot |
Messages In This Thread |
input->get('var_name') - by El Forum - 02-08-2011, 01:07 PM
input->get('var_name') - by El Forum - 02-08-2011, 02:03 PM
input->get('var_name') - by El Forum - 02-08-2011, 02:11 PM
input->get('var_name') - by El Forum - 02-08-2011, 02:46 PM
input->get('var_name') - by El Forum - 02-09-2011, 04:33 AM
input->get('var_name') - by El Forum - 02-09-2011, 08:02 AM
input->get('var_name') - by El Forum - 02-11-2011, 04:28 PM
|