El nuevo campo sería fechaenv en la tabla tblcentro.
El caso es que me da error, os dejo la parte donde me da error, es en el segundo "if"
Código:
Gracias if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
$fechacorrecta = substr( $_POST['fchFecha'],6,4)."-".substr( $_POST['fchFecha'],3,2)."-".substr( $_POST['fchFecha'],0,2);
if ((isset($_POST["MM_insert2"])) && ($_POST["MM_insert2"] == "form2")) {
$fechacorrecta = substr( $_POST['fechaenv'],6,4)."-".substr( $_POST['fechaenv'],3,2)."-".substr( $_POST['fechaenv'],0,2);
$updateSQL = sprintf("UPDATE tblcentro SET strNombre=%s, strLocalidad=%s, refProvincia=%s, strDireccion=%s, strCP=%s, strTelefono=%s, intLibros=%s, intNumProfesores=%s , fchFecha=%s, intVentasFOL2013=%s, intVentasEIE2013=%s, strObservaciones=%s, checkenv=%s, seguenv=%s, fechaenv=$s WHERE intCentro=%s",
GetSQLValueString($_POST['strNombre'], "text"),
GetSQLValueString($_POST['strLocalidad'], "text"),
GetSQLValueString($_POST['refProvincia'], "int"),
GetSQLValueString($_POST['strDireccion'], "text"),
GetSQLValueString($_POST['strCP'], "text"),
GetSQLValueString($_POST['strTelefono'], "text"),
GetSQLValueString($_POST['intLibros'], "int"),
GetSQLValueString($_POST['intNumProfesores'], "int"),
GetSQLValueString($fechacorrecta, "date"),
GetSQLValueString($_POST['intVentasFOL2013'], "int"),
GetSQLValueString($_POST['intVentasEIE2013'], "int"),
GetSQLValueString($_POST['strObservaciones'], "text"),
GetSQLValueString($_POST['checkenv'], "text"),
GetSQLValueString($fechaenv, "date"),
GetSQLValueString($_POST['seguenv'], "text"),
GetSQLValueString($_POST['intCentro'], "int"));


