POR FAVOR TU Y YO AYUDA PHP ES MUY PROBLEMAS, ESTOY ROPMRE MUCHOS VECES
Código PHP:
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "INSERT";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "INSERT";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "INSERT";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "INSERT";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}