All pastes #747402 Raw Edit

Mine

public text v1 · immutable
·published 2007-10-24 00:20 UTC
rendered paste body
	function sanitize($array)
	{
		$value = $this->_getValueMagic($field);
		echo "unsantized value is $value <br />"; //echo's correctly
		if (is_array($value) && array_key_exists("notArray", $array)) {
			$value = $value[0];
		}
		if (array_key_exists("isLength", $array)) {
			$value = substr($value,0,$array["isLength"]);;
		}
		if (array_key_exists("isWholeNum", $array)) {
			$value = preg_replace("/([^0-9])/","",$value);
			$noEscape = 'yes';
		}
		echo "sanitized value is $value <br />"; //echo's correctly
		echo "sanitized value is ". mysql_real_escape_string($value) ." <br />"; //echo's blank
	}