Welcome Guest, Not a member yet? Register   Sign In
uri_to_assoc issue

Hi there,

I'm passing a url-encoded piece of information into my controller, and I'm having trouble using uri_to_assoc to access it, which has me confused.

My code looks like this:


If my url is www.mysite.com/controller/method/filter/brandToyota, then I'm properly getting an array $var('filter'=>'brandToyota').

What I'm trying to do though is get my filter data in a format that's a little more easy to read, particularly as I'll have multiple filters applied in some cases and I don't want to use querystrings. So I'm trying to pass brand=Toyota, although url-encoded of course.

Why doesn't this work?


(errr...I don't know how to display that properly in the forums....there's a %,3,D (with no commas) between brand & Toyota in the url, not an equals sign)

In this case uri_to_assoc is only returning "brand"....I get an array $var('filter'=>'brand'), which obviously doesn't work for me.

I would have thought the "url safe" characters wouldn't have any effect on uri_to_assoc. In any case, any ideas how to get around this?

Thanks for any help!

Ahh....think I figured it out...% 3 D (the url encoded value for the equals sign) is in the $bad array in the input.php class.

My noobishness has me wondering why a url-encoded equals sign is bad...can someone please explain that to me? I think I understand why a regular old equals sign would be bad, but I would have thought a url-encoded one would be pretty safe.

I'm thinking of commenting out that little line from the $bad array and want to know if that's a phenomenally bad idea! Smile

Theme © iAndrew 2016 - Forum software by © MyBB