Omzy Posted December 3, 2009 Share Posted December 3, 2009 This isn't strictly PHP, but perhaps there is a PHP function that might help with this.. On a GET form submission, IE seems to output the page URL with certain characters encoded to their ASCII equivalent, for example if you have a group of checkboxes as an array (name="location[]"). In IE it's output in the address bar as: search.php?location%5B%5D=whatever In Firefox/Chrome it's output as it should be (search.php?location[]=whatever) For the sake of consistency and neater looking URLs, how can I fix this issue in IE? I tried the urldecode() function on the form action but that didn't work. Anything to do with the enctype attribute on the form? Quote Link to comment https://forums.phpfreaks.com/topic/183872-ie-url-encoding/ Share on other sites More sharing options...
cags Posted December 3, 2009 Share Posted December 3, 2009 Not a simple way to my knowledge, Internet Explorer does accept the characters if inputted by the user. You could in theory redirect the page back to itself after changing the values, but it would be a hack. Quote Link to comment https://forums.phpfreaks.com/topic/183872-ie-url-encoding/#findComment-970646 Share on other sites More sharing options...
Daniel0 Posted December 3, 2009 Share Posted December 3, 2009 Firefox encodes the URLs as well. It just doesn't display it to you. Quote Link to comment https://forums.phpfreaks.com/topic/183872-ie-url-encoding/#findComment-970663 Share on other sites More sharing options...
Omzy Posted December 3, 2009 Author Share Posted December 3, 2009 I see. So it's more to do with the way the browser displays the URL rather than how it processes the request. Quote Link to comment https://forums.phpfreaks.com/topic/183872-ie-url-encoding/#findComment-970667 Share on other sites More sharing options...
Daniel0 Posted December 3, 2009 Share Posted December 3, 2009 Exactly. Older versions of Firefox used to display the encoded URI in the address bar as well. Quote Link to comment https://forums.phpfreaks.com/topic/183872-ie-url-encoding/#findComment-970671 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.