Page 1 of 1

Extra slashes with output from DB - (Solved)

Posted: Sun Nov 24, 2002 8:08 am
by Portishead
Hi, my PHP scripts have been working fine until yesterday, now there are extra backslashes with the data extracted from the MySQL db.

These slashes are not in the database and only occur in front of the ' character.

Example:

http://www.frenchfilmsondvd.com/ShowReg ... 1048762418

db query output

| L'Ennui | L'Ennui | 1048762418 | 247171554 | Charles Berling, Sophie Guillemin, Arielle Dombasle | The French R2 release has the most extras, if English subtitles are needed then the R2 UK release is best | 1998 | | NULL | NULL |

I have contacted my web host but they have not got back to me yet, can anyone help please.

Thanks in advance

Posted: Sun Nov 24, 2002 8:13 am
by mydimension
have a look at the stripslashes() function: http://www.php.net/manual/en/function.stripslashes.php

Posted: Sun Nov 24, 2002 8:48 am
by Portishead
That works, but as my scripts have been working fine until yesterday why do I need to rewrite them all to use stripslashes?

Posted: Mon Nov 25, 2002 2:39 am
by Portishead
Finally got a response from my host apparently somehow the magic quotes directive was switched on and it caused the problem.

Thanks for the help anyway.