Return to Snippet

Revision: 32444
at September 25, 2010 00:19 by sb_01


Initial Code
if (ini_get('magic_quotes_gpc')) {
	function clean($data) {
   		if (is_array($data)) {
  			foreach ($data as $key => $value) {
    			$data[clean($key)] = clean($value);
  			}
		} else {
  			$data = stripslashes($data);
		}
	
		return $data;
	}			
	
	$_GET = clean($_GET);
	$_POST = clean($_POST);
	$_COOKIE = clean($_COOKIE);
}

Initial URL

                                

Initial Description

                                

Initial Title
Magic Quotes Fix

Initial Tags

                                

Initial Language
PHP