The $_GET data silver bullet |
[eluser]Xeoncross[/eluser]
One of the problems that is introduced by CodeIgniter is the loss of sloppy coding by just appending values to the URL in the form of $_GET data. Code: http://mail.google.com/mail/?shva=1#inbox CodeIgniter should be congratulated for helping to move the world out of appending sloppy garbage to URL's just because it is faster. Form data should be $_POST and $_GET data should be a nice URL segment passed to the controller method being called. Quote:Start Rant<<< But what happens when you have a single URL value that you really want to append to the URI without having CI choke on the URL or complain about bad characters? The answer is to quickly base 64 encode them. Code: //Pass complex values though the URL Examples Now when using DX Auth I can redirect someone to the login page and pass along a URL they should send the user back to when I am done. I can also use this on my file uploads system to pass system paths though the URL without the '/' or '\' choking up CI as it tries to create URI segments. Code: //$path = '/uploads/subfolder/' When using page tokens I can use complex symbols without CI messing with them. And the list goes on and on. I can't think of a single controller that I have built that isn't using this method to add something to the URL - whether a security token or a return_to path. I recommend that this function be added to CodeIgniter to deal with all the problems that users keep coming up with when trying to add complex data to the URL. |
Welcome Guest, Not a member yet? Register Sign In |