Ver Mensaje Individual
  #4 (permalink)  
Antiguo 22/05/2006, 06:20
jossxx
 
Fecha de Ingreso: marzo-2003
Mensajes: 225
Antigüedad: 21 años, 1 mes
Puntos: 0
sigo probando,
lo que más cerca anda es esto pero me dice que hay un error de sintaxis en linea 1 cerca de ""

Código PHP:
<?php require_once('../../Connections/zona.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 socios SET Nom=%s, Apellidos=%s, email=%s WHERE Socio = $usu",
                       
GetSQLValueString($_POST[nombre], "text"),
                       
GetSQLValueString($_POST[apellidos], "text"),
                       
GetSQLValueString($_POST[correo], "text"));
                       
  
mysql_select_db($database_zona$zona);
  
$Result1 mysql_query($updateSQL$zona) or die(mysql_error());
  
$updateGoTo "../../socios/soclis.php";
  if (isset(
$_SERVER['QUERY_STRING'])) {
    
$updateGoTo .= (strpos($updateGoTo'?')) ? "&" "?";
    
$updateGoTo .= $_SERVER['QUERY_STRING'];
  }
  
header(sprintf("Location: %s"$updateGoTo));
}
?>
´

saludos nuevamente