mark wrote:
[color=blue]
> I have a problem that php removes the + char. When i type this in the
> adres bar:
>
http://www.test.com/test.php?t=a+b
>
> and when i do a echo in the php page the + char is gone?[/color]
You are not sending a + character to the script. You are sending a space to
the script. Special characters like spaces get encoded so that they are
safe for transport across HTTP. Your script is seeing the data you sent
it, not the raw encoded form.
When you create links with non-hardcoded data in the query string, make sure
you run urlencode() over the data you are supplying:
echo("http://www.example.com/test.php?t=" . urlencode($data));
(Also, somebody owns the test.com domain, example.com is reserved
specifically for this purpose).
[color=blue]
> I also tried
> to use the javascript escape function before redirecting but that
> won't work eather.[/color]
Client-side scripting is unreliable. Plenty of people have javascript
unavailable, for all sorts of reasons.
--
Jim Dabell