Stripslashes redundancy question.

From: Date: Sun, 24 Oct 2010 22:29:44 +0000
Subject: Stripslashes redundancy question.
Groups: php.general 
Request: Send a blank email to php-general+get-309044@lists.php.net to get a copy of this message
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

« previous php.general (#309044) next »