I'm trying to update the database after select a few options and submit (using isset). The page display some information after a database query, and then I have to update the database according to the selected option. If I run exactly the same query that is inside the function "actualizarEstado" but on a third page, then it works. What am I doing wrong? I can't understand. Tried to kill and close the first connection, but I get the same results. Thanks in advice!
<?php
include '00-conexion.php';
$data = extract($_GET);
$sql = "SELECT * FROM inscripciones WHERE nroInscripcion = $sel";
$retval = mysqli_query($conexion, $sql);
$fila = mysqli_fetch_array($retval);
if(isset($_POST['ejecutar'])){
    actualizarEstado($sel);
}
function actualizarEstado($sel){
    $estado =  $_POST['estado'];
    $sql2 = "UPDATE inscripciones SET revision1='',
        revision2='',
        revision3='',
        revision4='',
        revision5='',
        revision6='',
        revision7='',
        revision8='',
        revision9='',
        estado='$estado'
        WHERE nroInscripcion = $sel";
    if (!mysqli_query($conexion, $sql2)) {
        die('Error: ' . mysqli_error($conexion));
    }
}
?>
<form method="post" action="">
        <tr><td><select name="estado" from="estado">
            <option value="aceptado">Aceptar</option>
            <option value="rechazado">Rechazar</option>
            <option value="revision">En revision</option>
        </tr/></td>
        <tr><td><input type="submit" value="Actualizar" name="ejecutar" onclick="return confirm('¿Estás seguro que deseas?')" /></tr></td>
</form>
 
    