So I have the following PHP-code:
echo $_GET["r"];
Which is really simple..
But when I request the PHP-file like this: ....php?r=123+123
, it spits out "123 123", not "123+123" with a plus sign. Why is this happening and how do I fix it?
I have tried:
echo urlencode($_GET["r"]);
Which works, BUT, this was a really simple example, if I were to set that to a variable:
$r = urlencode($_GET["r"]);
The variable $r
would be set to 123%2B123
and not 123+123
, I want the variable $r
to be set with the real plus sign, not %2B?