I have just noticed a problem reading MySql data with PHP running as an
apache module.

Basically, any data retrieved from MySql that contains a single quote (and
no doubt other characters too) is displayed with a slash in it when printed
by PHP.

For example:

$surname = "O'Brien";
print "$surname";

displays -  O'Brien - while

print "$surname";

displays -  O\'Brien - even thought doing a select from the shell shows that
is  stored in mysql without the slash

My ISP reciently upgraded from 4.12 to 4.2.2 and i wonder if this has
anything to do with this, as these scripts did not ass slashes in print
outputs before and have not been changed.

I'm sure this is some PHP configuration thing, but magic quotes are off, and
in any case I assumed this applied to incoming data only?

What do I need to change and can I do this within a .htaccess file so it can
easily be applied to all my scripts without changing them?

Many thanks,


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

Reply via email to