Page 1 of 1

how can we add the slashes

Posted: Mon Oct 29, 2007 9:48 am
by prakum
hi friends,
i am using one tooltip. it is not allowing the the '(single quot) and "(double quot).
befoe that i should add the \'(for sing quot) and &quot(for double quot). how can i add. give some idea.
please help to me.

thanks,
prakum.

php manual

Posted: Mon Oct 29, 2007 9:56 am
by N1gel
There are several things in the php manual that might help

addslashes

or

mysql_escape_string

or if you wanted to code it yourself you could use

str_replace

Posted: Mon Oct 29, 2007 9:57 am
by feyd
You probably don't need slashes, but htmlspecialchars().