DONDE PONGO EL strtoupper ??
Código php:
Ver original<?php
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ?
intval($theValue) : "NULL"; break;
case "double":
$theValue = ($theValue != "") ?
"'" . doubleval($theValue) . "'" : "NULL"; break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) { $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']); }
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) { $insertSQL = sprintf("INSERT INTO estudiante (apellido, nombre, cedula, codigo, rango, especializacion, ciudadcasa, dircasa, telcasa, celular1, celular2, email1, email2, empresa, ciudadjob, cargo, teljob, observacion, ingresoyear, usuario, password, nivel) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)", GetSQLValueString($_POST['apellido'], "text"),
GetSQLValueString($_POST['nombre'], "text"),
GetSQLValueString($_POST['cedula'], "text"),
GetSQLValueString($_POST['codigo'], "text"),
GetSQLValueString($_POST['rango'], "text"),
GetSQLValueString($_POST['especializacion'], "text"),
GetSQLValueString($_POST['ciudadcasa'], "text"),
GetSQLValueString($_POST['dircasa'], "text"),
GetSQLValueString($_POST['telcasa'], "text"),
GetSQLValueString($_POST['celular1'], "text"),
GetSQLValueString($_POST['celular2'], "text"),
GetSQLValueString($_POST['email1'], "text"),
GetSQLValueString($_POST['email2'], "text"),
GetSQLValueString($_POST['empresa'], "text"),
GetSQLValueString($_POST['ciudadjob'], "text"),
GetSQLValueString($_POST['cargo'], "text"),
GetSQLValueString($_POST['teljob'], "text"),
GetSQLValueString($_POST['observacion'], "text"),
GetSQLValueString($_POST['ingresoyear'], "date"),
GetSQLValueString($_POST['usuario'], "text"),
GetSQLValueString($_POST['password'], "text"),
GetSQLValueString($_POST['nivel'], "text"));
$insertGoTo = "index.php";
if (isset($_SERVER['QUERY_STRING'])) { $insertGoTo .= (strpos($insertGoTo, '?')) ?
"&" : "?"; $insertGoTo .= $_SERVER['QUERY_STRING'];
}
}
$query_Recordset1 = "SELECT * FROM estudiante";
?>