Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?
- function safety( $array )
- {
- $array2 = array();
- foreach( $array as $key => $value )
- {
- if( get_magic_quotes_gpc() )
- {
- $key = stripslashes($key);
- }
- $key = str_replace(array("\\\\0","\\\0","\\0","\0"),"", $key);
- $key = htmlentities($key,ENT_QUOTES);
- if( is_array($value) )
- {
- $value = safety( $value );
- }
- else
- {
- if( get_magic_quotes_gpc() )
- {
- $value = stripslashes($value);
- }
- $value = str_replace(array("\\\\0","\\\0","\\0","\0"),"", $value);
- $value = htmlentities($value,ENT_QUOTES);
- }
- $array2[ $key ] = $value;
- }
- return $array2;
- }
- $_POST = safety($_POST);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement