Posted by Thomas Mlynarczyk on 12/25/06 22:56
Also sprach Peter:
> For years I have used a '#' character in certain strings in an
> application but now I find I need to pass those strings to a php
> script. #characters seem to cut off strings
> e.g. www.url.com/script.php?text=mytext#yourtext
> and $text will only contain mytext
> #yourtext is gone
In your example, #yourtext would mean a fragment identifier (an anchor
within the document), which is not part of the URL (only the browser needs
it to know how far to scroll down when displaying the page).
You could escape the # (%35 or something like that) and PHP has functions to
do the encoding and decoding. See
http://de.php.net/manual/en/function.urlencode.php and related functions.
Greetings,
Thomas
Navigation:
[Reply to this message]
|