Javier Montserat wrote:
> Hi
> Single quote's in strings entered via a text input field are
> subsequently appearing with what appears to be an escape character -
> comm\'ents
> how can i correct this?  I've tried
> htmlspecialchars($string, ENT_QUOTES);
> and
> htmlentities($string, ENT_QUOTES);
> but these don't seem to work (maybe its me).

Probably you have magic_quotes_gpc set to On in php.ini...you can change
this to Off, or you can use stripslashes() on the $string variable...

HTH Erwin

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

Reply via email to