I'm having a strange issue with the PHP AddSlashes function. I have a PHP script that gets information from one ODBC datasource, and UPDATES a MySQL db. I assign the variable from the ODBC datasource, and then perform the AddSlashes function on that variable for inclusion into the MySQL db. This works fine, until the variable has both " and ' in the string. For example, if the variable is: 30" & 40" INV'S -- The AddSlashes function will only escape the quotes, and not the '. If I remove the quotes from the variable, it properly escapes the ', and vice versa. Is this a possible bug in PHP?
PHP 4.0.6 (with upload file patch)
Apache 1.3.22
RH 6.2 Bruce Garlock
bruceg@tiac.net
PHP 4.0.6 (with upload file patch)
Apache 1.3.22
RH 6.2 Bruce Garlock
bruceg@tiac.net