Posted by Serge Terryn on 12/29/06 09:21
Peter schreef:
> Hi,
>
> 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
>
> I have changed the program and php so that a # characters are replaced by a
> dash '-' and I apply the logic on that (so no problem)
> but now I also need the ability to manually input the data (POST form) and
> of course now the '#' is again used by those that do not know.
>
> Besides onvious warnings in the html, can I fix this in php ?
>
> Can I check for the '#' character ?
> In my test I can't seem to do that because the #' and rest of the text are
> already gone ?
>
> Your input appreciated
>
>
>
Maybe : $url = 'www.url.com/script.php?text=mytext#yourtext'; // use of
single quotes.
Or with double quotes :
$url = "www.url.com/script.php?text=mytext\#yourtext";
--
Posting at the top because that's where the cursor happened to be,
is like shitting in your pants because that's where your asshole
happened to be.
http://www.essetee.be
[Back to original message]
|