Re: Escape Characters

From: Date: Thu, 27 Feb 2003 13:28:26 +0000
Subject: Re: Escape Characters
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-137379@lists.php.net to get a copy of this message
> I'm running a script that reads the contents of images and stores them > in a MySQL database. The problem I'm running into is that my server is > seeing "\" as escape characters and stripping them out. I assume this > has something to do with "Magic Quotes" or something of that nature but > I'm not exactly sure which variable I'm playing with. For the time > being I'm replacing any "\" with "\\" so it only escapes one of them, > but I'm sure this is not the correct solution. If anyone has any idea > what I'm doing wrong any info would be greatly appreciated. I > apologize if this has already been discussed but I could not find it in > the archive. Maybe I was searching for the wrong thing? Please help. That's the correct solution. You can use addslashes() to do it for you. magic_quotes_gpc will do this automatically to data submitted through a form. ---John Holmes...

« previous php.general (#137379) next »