Re: Magic Quotes Problem
| From: | Jack McKinney | Date: | Thu, 26 Oct 2000 16:44:23 +0000 |
| Subject: | Re: Magic Quotes Problem | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-3960@lists.php.net to get a copy of this message | ||
Big Brother tells me that Keith Spiller wrote:
> Apparently, Magic Quotes is turned on in the ini file, and so when something as simple as
> "it's" with an apostrophe is inserted into an input window, the \ is added before it.
> So that "it's" becomes "it\'s". This is ok if it would display
> alright, but when a query list the contents of that record, the \' is still there. Is there
> know way to fix this? We need to be able to insert ' and "s... Do I have to write a
> special function to scan all strings for \ and strip them out for display?
>
> Keith
Turn off magic quotes, add pass any string you need escaped (for mysql
queries for example) through addslashes().
--
"Restore your inalienable human rights. Jack McKinney
Vote Libertarian. http://www.lp.org http://www.lorentz.com
http://www.harrybrowne2000.org
jackmc@lorentz.com
1024D/D68F2C07 4096g/38AEF076