note 93492 deleted from function.get-magic-quotes-gpc by danbrown

From: Date: Sun, 13 Sep 2009 15:57:31 +0000
Subject: note 93492 deleted from function.get-magic-quotes-gpc by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-160507@lists.php.net to get a copy of this message
Note Submitter: gentoo at gmx dot de ---- Use the following to bypass magic quotes: // If magic-quotes is enabled, strip out slashes if ( get_magic_quotes_gpc ( ) ) { // function for removing slashes in arrays and strings if ( ! function_exists ( 'stripslashes_deep' ) ) { function stripslashes_deep ( $value ) { return ( is_array ( $value ) ? array_map ( 'stripslashes_deep', $value ) : stripslashes ( $value ) ) ; } } $_GET = array_map ( 'stripslashes_deep', $_GET ) ; $_POST = array_map ( 'stripslashes_deep', $_POST ) ; $_COOKIE = array_map ( 'stripslashes_deep', $_COOKIE ) ; $_REQUEST = array_map ( 'stripslashes_deep', $_REQUEST ) ; }

« previous php.notes (#160507) next »