You can encode string before sending it out.
Try htmlspecialchars($str, ENT_QUOTES).. before sending string
-
from PHP manual:
The translations performed are:
a.. '&' (ampersand) becomes '&'
b.. '"' (double quote) becomes '"' when ENT_NOQUOTES is not set.
c.. ''' (single quote) becomes ''' only when ENT_QUOTES is set.
d.. '<' (less than) becomes '<'
e.. '>' (greater than) becomes '>'
-
Hope this helps,
Muhammed Mamedov
tmchat.com
- Original Message -
From: "Ferry CS" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, January 14, 2004 12:20 PM
Subject: [PHP-DB] PHP Problem, Special String Character...please help
> Hai...
>
> I have problem with manipulating the string...
> How to send the string with special character
> included to the other pages...
>
> For example the string "Father & Son", when I send into
> other page the display become "Father"
> Example special characters are &, +, <, >, etc
>
>
> How to fix it???
> Thanks very much for your kind attention
>
> Best Regards,
> Ferry
>
>
> PHP sample
>
> file 1 : string_test.php
>
>
> $title="Father & Son";
> echo "the real title : $title";
> ?>
>
>
> next page
>
>
>
>
>
>
> file 2 : string_display.php
>
>
> echo "in this page";
> echo "the title : $stitle";
> ?>
> Could you fix this problem??
> the title should be "Father & Son"
> the problem is using the special character ( &, +, ", <, >, etc)
>
> back
>
>
>
> _
> Add photos to your messages with MSN 8. Get 2 months FREE*.
> http://join.msn.com/?page=features/featuredemail
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php