Return to Snippet

Revision: 33666
at October 12, 2010 01:31 by sb_01


Updated Code
private static $forbidden_chars = array("from","'","union","select","+","0x",">","<","\\","/","\"");

static function cleanUp($array) {
	if(is_array($array)) {
		foreach($array as $key => $value) {
			$array[$key] = self::replaceForbidden($value);
		}
		return $array;
	} else {
		return self::replaceForbidden($array);
	}
}

static function replaceForbidden($str) {
	return str_replace(self::forbidden_chars, '', $str);
}

Revision: 33665
at October 12, 2010 01:24 by sb_01


Updated Code
private static $forbidden_chars = array("from","'","union","select","+","0x",">","<","\\","/","\"");

static function forbiddenChar($array) {
	if(is_array($array)) {
		foreach($array as $key => $value) {
			$array[$key] = self::replaceForbidden($value);
		}
		return $array;
	} else {
		$this->replaceForbidden($array);
	}
	return false;
}

static function replaceForbidden($str) {
	return str_replace(self::forbidden_chars, '', $str);
}

Revision: 33664
at October 12, 2010 01:24 by sb_01


Updated Code
private static $forbidden_chars = array("from","'","union","select","+","0x",">","<","\\","/","\"");

static function forbiddenChar($array) {
	if(is_array($array)) {
		foreach($array as $key => $value) {
			$array[$key] = self::replaceForbidden($value);
		}
		return $array;
	} else {
		$this->replaceForbidden($array);
	}
	return false;
}

static function replaceForbidden($str) {
	return str_replace($this->forbidden_chars, '', $str);
}

Revision: 33663
at October 12, 2010 01:18 by sb_01


Updated Code
private static $forbidden_chars = array("from","'","union","select","+","0x",">","<","\\","/","\"");

static function forbiddenChar($array) {
	if(is_array($array)) {
		foreach($array as $key => $value) {
			$array[$key] = CLASSNAME::replaceForbidden($value);
		}
		return $array;
	} else {
		$this->replaceForbidden($array);
	}
	return false;
}

static function replaceForbidden($str) {
	return str_replace($this->forbidden_chars, '', $str);
}

Revision: 33662
at October 12, 2010 01:14 by sb_01


Initial Code
private $forbidden_chars = array("from","'","union","select","+","0x",">","<","\\","/","\"");

function forbiddenChar($array) {
	if(is_array($array)) {
		foreach($array as $key => $value) {
			if(is_array($value)) {
				$value = '';
			}
			$array[$key] = $this->replaceForbidden($value);
		}
		return $array;
	}
	return false;
}

Initial URL


Initial Description


Initial Title
clean up values

Initial Tags


Initial Language
PHP