I want to update an image but when I try to do it, it gives me an error but it does not show me what it was, please if you can support me.
Form to update
<form action="actualizarimg.php">
<?php while($registro=$resultado->fetch_assoc()) { ?>
<label for="nombre">Nombre</label>
<input type="text" value="<?php echo $registro['nombre']; ?>">
<img height="200px" src="./<?php echo $registro['ruta_imagen']; ?>">
<input type="text" value="<?php echo $registro['ruta_imagen'];?>"
<label for="img">Imágen</label>
<input type="file"> <p>Subir Archivo</p>
<label>Descripción</label>
<input type="text" value="<?php echo $registro['descripcion']; ?>">
<input type="submit" value="Actualizar">
</form>
<?php } ?>
Refresh.php
<?php
include('conexion.php');
if(isset($_GET['cve_imagen'])){
$cve_imagen=$_GET['cve_imagen'];
}
if(isset($_GET['nombre'])){
$nombre=$_GET['nombre'];
}
if(isset($_GET['descripcion'])){
$descripcion=$_GET['descripcion'];
}
if(isset($_GET['ruta_imagen'])){
$ruta_imagen=$_GET['ruta_imagen'];
$sql = "UPDATE imagenes SET nombre='$nombre', descripcion='$descripcion', ruta_imagen='$ruta_imagen' WHERE cve_imagen='$cve_imagen' ";
mysqli_query($conexion, $sql);
echo "<script type='text/javascript'>;
alert ('Los datos se actualizaron exitosamente');
window.location='eliminar.php';
</script>";
}else {
echo "<script type='text/javascript'>;
alert ('Error al actualizar los datos');
window.location='eliminar.php';
</script>";
}
$conexion->close();
?>