Page 1 of 1

/'s appearing on displaying info stored on mySQL

Posted: Fri Jan 12, 2007 3:05 pm
by CdnRebel
Hi,

When a field is entered with a quote and stored on mySQL and redisplayed, a "/" is added and if I keep on redisplaying, more "/" get added. The text info is being stored on the file and the file information is displaying, so what would be happening in the syntax to cause that?

Thanks,
CdnRebel

Posted: Fri Jan 12, 2007 3:17 pm
by John Cartwright
Basically, you have magic quotes enabled, you should disable this in your php.ini or .htaccess file. You can also strip the slashes during your script's execution.

Code: Select all

if (get_magic_quotes_gpc()) {
   $_POST = array_map('stripslashes', $_POST);
}

slashes appearing when text with quotes is redisplayed

Posted: Fri Jan 12, 2007 3:56 pm
by CdnRebel
Thanks JCart,

I'll try other methods before posting again.

CdnRebel