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]

Reply via email to