Stripslashes redundancy question.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In my form processing scripts, I usually have the variable set as so:

$email = stripslashes($_POST['email']);

I have discovered that the program that I use has a pre-written function of 
this:

// remove escape characters from POST array
if (get_magic_quotes_gpc()) {
  function stripslashes_deep($value) {
    $value = is_array($value) ? array_map('stripslashes_deep', $value) : 
stripslashes($value);
    return $value;
    }
  $_POST = array_map('stripslashes_deep', $_POST);
  }

I just put this in a script that I have been using, leaving the original 
stripslashes in the variable. The script still works, but is there a problem 
with redundancy, or does one cancel the other out?

Also, which do you think is a better method to use?

Thank you

Gary 



__________ Information from ESET Smart Security, version of virus signature database 5560 (20101024) __________

The message was checked by ESET Smart Security.

http://www.eset.com





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux