<?php
include '../comunes_php/cors.php';
include "../comunes_php/Log.class.php"; 
$log = new Log("app_trace", "../");	 

$id = intval($_REQUEST['id']);
$nombre = $_REQUEST['nombre'];



include 'tabla.php';
include '../rdb/conn.php';

$sql = "update $tabla set nombre='$nombre' where id=$id";
@mysqli_query( $conn,$sql);
$log->insert($sql, false, false, false);

echo json_encode(array(
	'id' => $id,
	'nombre' => $nombre,
	'sql'=>$sql
));
?>