I know that codeIgniter turns off GET parameters by default.
But by having everything done in POST, don't you get annoyed by the re-send data requests if ever you press back after a form submission?
It annoys me, but I'm not sure if I want to allow GET purely for this reason.
Is it such a big security issue to allow GET parameters too?
$this->uri->segment(n) Segment function allow you to retrieve a specific segment form URI string where n is a segment number. Segments are numbered from left to right. For example,if your URI like. By the above example URI segment function give result by n parameter.
In terms of codeigniter: You'll notice that each controller in codeigniter extends the base controller class. Using $this in a controller gives you access to everything which is defined in your controller, as well as what's inherited from the base controller.
When I first started working with CodeIgniter, not using GET really threw me off as well. But then I realized that you can simulate GET parameters by manipulating the URI using the built-in URI Class. It's fantastic and it makes your URLs look better.
Or if you really need GETs working you can put this into your controller:
parse_str($_SERVER['QUERY_STRING'], $_GET);
Which will put the variables back into the GET array.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With