diff --git a/funciones/funciones.php b/funciones/funciones.php index 82a2442..2850d5c 100644 --- a/funciones/funciones.php +++ b/funciones/funciones.php @@ -13469,6 +13469,44 @@ if($div !='') { $xajax->registerFunction("eliminar_campo"); +function actualizar_linea($id,$tabla,$formulario,$div) { + //$valores ="$formulario[0]"; + $nombre = $formulario['nombre']; + foreach($formulario as $c=>$v){ + + $valores .= " $c = '$v',"; + } + $valores = "$valores id_empresa = '$_SESSION[id_empresa]'"; + $key = limpiar_caracteres($key); +$respuesta = new xajaxResponse('utf-8'); + $link=Conectarse(); + mysqli_set_charset($link, "utf8"); + //$insertar = "INSERT INTO $tabla set $valores"; + $edit = "UPDATE $tabla SET $valores WHERE id = '$id' limit 1; "; + $sql=mysqli_query($link,$edit); + if(mysqli_affected_rows($link) != 0){ + $respuesta->addAssign("$div","innerHTML","