views:

37

answers:

1

Why is it that codeigniter and perhaps other mvc frameworks disallow the use of get variables. Is it security? DO they think that get is overused and abused?

I think that both post and get have their places and should be used for their intended uses?

Can anyone offer an explanation for me?

+3  A: 

Update:

Here is the answer from CI:

Destroys the global GET array. Since CodeIgniter does not utilize GET strings, there is no reason to allow it.

Destroys all global variables in the event register_globals is turned on.

Filters the POST/COOKIE array keys, permitting only alpha-numeric (and a few other) characters.

Source: http://codeigniter.com/user_guide/libraries/input.html

They most likely replace it for security reasons (although not sure) or in favor of their input library which allows you to prevent XSS attacks amongst other things.

You can still access GET and POST data through the input library like this:

$var = $this->input->post('varname', true);
$var = $this->input->get('varname', true);

The true argument is whether or not you want to run XSS filter function on your variables/data.

Sarfraz