Page 1 of 1

Php decoding querystrings

Posted: Sun Jul 25, 2010 7:43 pm
by Wootah
Hi all,

I have recently learnt that php decodes a query string automatically. Is there a way to disable this feature for a webpage?

So when you write code like:

Code: Select all

	$account = $_REQUEST["account"];
There is an automatic decode($account); that occurs.

This is probably a very good thing but in my current situation it is not desirable. What is the best way to get the querystring data 'as is'?

Re: Php decoding querystrings

Posted: Sun Jul 25, 2010 8:38 pm
by Christopher
You may want to parse $_SERVER["QUERY_STRING"] manually with parse_url() (I think parse_str() will decode).