I am trying to access the table of my bd, to change a value "revision" (now it is worth 1 and I want to pass to 2) of a specific row using its id.
Although the error gives me at the time of ending the connection, I think I'm doing the query wrong, but I do not know how to access that row and change the value of one of the cells if it is not this way .
I get the following error:
Warning: mysqli_free_result () expects parameter 1 to be mysqli_result, boolean given in C: \ xampp \ htdocs \ PHP_WEB_MMR \ Platform \ PHP \ Project \ validateProposal.php on line 34
<?php
// Conectamos con la base de datos.
$bd_host = "localhost";
$bd_usuario = "root";
$bd_password = "";
$bd_base = "carrot";
$conexion = mysqli_connect($bd_host, $bd_usuario, $bd_password);
mysqli_select_db($conexion,$bd_base);
$idValidacion = $_POST['idValidar'];
// $idValidacion = mysqli_real_escape_string($conexion, $_POST['idValidar']);
$revision = 2;
$consulta = "
INSERT INTO propuesta(revision)
VALUES ('$revision')
WHERE id = $idValidacion
";
$resultado = mysqli_query($conexion, $consulta);
// Liberamos y cerramos conexión.
mysqli_free_result($resultado);
mysqli_close($conexion);
?>