The way I do it is to use a function to check if magic quotes are on (because if they're on the conversion is done automatically for you) and if they're not, use the AddSlashes function before writing to the database and use StripSlashes after reading from the database. You can use these two functions: function myAddSlashes($st) { if (get_magic_quotes_gpc()==1) { return $st; } else { return AddSlashes($st); } } function myStripSlashes($st) { if (get_magic_quotes_gpc()==1) { return $st; } else { return StripSlashes($st); } } Hope this helps, Aral :) ______________________________ ([EMAIL PROTECTED]) New Media Producer, Kismia, Inc. ([EMAIL PROTECTED]) Adj. Prof., American University ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ -- 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]
- RE: [PHP] Filtering out \ when a ' is user entered? Jamie Thompson
- Re: [PHP] Filtering out \ when a ' is user ente... Alexander Wagner
- Re: [PHP] Filtering out \ when a ' is user entered? ReDucTor
- RE: [PHP] Filtering out \ when a ' is user entered? Matt Williams
- Re: [PHP] Filtering out \ when a ' is user entered? Steve
- Re: [PHP] Filtering out \ when a ' is user entered? Meir Kriheli - MKsoft
- Re: [PHP] Filtering out \ when a ' is user entered? Jason Stechschulte
- Re: [PHP] Filtering out \ when a ' is user entered? Christian Reiniger
- RE: [PHP] Filtering out \ when a ' is user entered? James Cox
- Re: [PHP] Filtering out \ when a ' is user entered? Steve Edberg
- RE: [PHP] Filtering out \ when a ' is user entered? Aral Balkan
- RE: [PHP] Filtering out \ when a ' is user entered? scott [gts]
- Re: [PHP] Filtering out \ when a ' is user entered? Philip Olson
- Re: [PHP] Filtering out \ when a ' is user entered? Steve Werby
- Re: [PHP] Filtering out \ when a ' is user entered? Richard Lynch
- Re: [PHP] Filtering out \ when a ' is user ente... Delbono
- Re: [PHP] Filtering out \ when a ' is user ... Christian Reiniger
- Re: [PHP] Filtering out \ when a ' is u... Richard Lynch
- Re: [PHP] Filtering out \ when a ' is user entered? Christopher Ostmo
- Re: [PHP] Filtering out \ when a ' is user entered? Stephen Cope
- Re: [PHP] Filtering out \ when a ' is user entered? Aral Balkan