Re: [PHP-DB] PHP Problem, Special String Character...please help

2004-01-14 Thread Olwen Williams
If you are sending this as a query string to another page you want
rawurlencode or urlencode rather than htmlspecialchars
brett king wrote:

Try using HTMLSPECIALCHAR() function.

$title = htmlspecialhtml($title);

--
Olwen Williams
See my B&B site
http://www.bandbclub.com
and my new site http://www.handyman.co.nz - A virtual shed for real kiwi
blokes.
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-DB] PHP Problem, Special String Character...please help

2004-01-14 Thread Muhammed Mamedov
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



RE: [PHP-DB] PHP Problem, Special String Character...please help

2004-01-14 Thread Ferry CS
I already received your help...
I really loved it...
Thanks very much all...
I will try it...

_
The new MSN 8: advanced junk mail protection and 2 months FREE* 
http://join.msn.com/?page=features/junkmail

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP-DB] PHP Problem, Special String Character...please help

2004-01-14 Thread brett king
Try using HTMLSPECIALCHAR() function.

$title = htmlspecialhtml($title);

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] PHP Problem, Special String Character...please help

2004-01-14 Thread Toby Irmer
> I have problem with manipulating the string...
> How to send the string with special character
> included to the other pages...

Take a look at this

http://de2.php.net/urlencode

http://de2.php.net/urldecode


hth

toby

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php