It's been my experience that there is no need for calling stripslashes when pulling the data out of the database. This is probably an effect of having magic_quotes_runtime off.
Mike Martin Towell wrote: >maybe mysql is stripping the slashes and not php ?? > >-----Original Message----- >From: Steve Cayford [mailto:[EMAIL PROTECTED]] >Sent: Tuesday, December 04, 2001 10:57 AM >To: [EMAIL PROTECTED] >Subject: [PHP] Why are slashes automatically stripped from db result? > > >Hey all. I'm storing some jpeg images in a mysql database using the PEAR >classes. Before inserting the image into the db I call addslashes() on >the data, I was, accordingly, calling stripslashes() on the data after >pulling the image back out of the database, but the image was getting >mangled. I finally realized that the slashes were already stripped from >my query results so stripping them again was removing legitimate slashes. > >The question is: why are the slashes already stripped out of the db >results? I call set_magic_quotes_runtime(0) at the beginning of the >scripts to turn off magic quoting. What else would cause this? > >Thanks for any suggestions. > >-Steve > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]