Interesante

Páginas: 4 (768 palabras) Publicado: 15 de julio de 2012
Conexion php
<?php require_once('Connections/servicio.php'); ?>
<?php
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue =(!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue;

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_update"])) && ($_POST["MM_update"] == "form1")) {
$updateSQL = sprintf("UPDATE prestamos SET apellidos=%s, ciudad=%s, `no.cuenta`=%s, `monto a depositar`=%s WHERE nombre=%s",
GetSQLValueString($_POST['apellidos'], "text"),
GetSQLValueString($_POST['ciudad'], "text"),GetSQLValueString($_POST['no_cuenta'], "text"),
GetSQLValueString($_POST['monto_a_depositar'], "text"),
GetSQLValueString($_POST['nombre'],"text"));

mysql_select_db($database_servicio, $servicio);
$Result1 = mysql_query($updateSQL, $servicio) or die(mysql_error());
}

mysql_select_db($database_servicio, $servicio);$query_brenda = "SELECT * FROM prestamos";
$brenda = mysql_query($query_brenda, $servicio) or die(mysql_error());
$row_brenda = mysql_fetch_assoc($brenda);
$totalRows_brenda = mysql_num_rows($brenda);...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Muy interesante
  • Interesante
  • Interesante
  • interesante
  • interesante
  • Interesante
  • interesante
  • interesante

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS