Subject | Re: [firebird-php] Handling quote characters in Firebird/PHP |
---|---|
Author | Jiri Cincura |
Post date | 2006-03-02T06:36:14Z |
On 1.3.2006 23:18 Nigel Weeks wrote:
function FixIt($data)
{
return str_replace("'", "''", stripslashes($data));
}
the stripslashes function also removes the \ char, which is good for
MySQL, etc. and the default configuration of PHP uses it.
--
Jiri Cincura
http://www.cincura.net/
> $surname = str_replace("'","''",$surname);Sometimes I'm using:
> $firstname = str_replace("'","''",$firstname);
function FixIt($data)
{
return str_replace("'", "''", stripslashes($data));
}
the stripslashes function also removes the \ char, which is good for
MySQL, etc. and the default configuration of PHP uses it.
--
Jiri Cincura
http://www.cincura.net/