here’s the code i’m using:
$from=urldecode($_GET['from']);
$str =urldecode("%2B");
echo "$str<br>";
echo "$from<br>";
and here’s part of the URL: from=%2B995594262653
why does this echo
+
995594262653
? (note, there’s a space in front of the number).
i am using $str to check if the function works at all. apparently, it works for a simple %2B. What could be an issue?
It is working, but you need to realise that PHP will automatically urldecode the data it in puts in the $_GET array. You are doing it a second time and transforming the input even more.
When your script runs,
$_GET['from']contains+995594262653When you run that value through urldecode, the
+gets transformed to a space.