I'm trying to make a photo gallery to learn a bit about programming in php, but I've been stuck when it comes to wanting to show the images.
The images are stored on the server and the path in the database. The problem is that all the div that shows the image, with title and description, is in php and I can not see the image too.
Deputy:
<?php
$consulta = "SELECT nombre, archivo, descripcion FROM imagenes ORDER BY RAND()";
$resultado = mysqli_query($conexion, $consulta) or trigger_error("error de consulta");
if($resultado){
while ($col = mysqli_fetch_assoc($resultado)){
echo '<div class="col-md-4">';
echo '<img src="'.$col['archivo'].'" alt="" class="img-rounded">';
echo '<div class="caption">';
echo '<h4>';
echo $col['nombre'];
echo '</h4>';
echo '<small>';
echo $col['descripcion'];
echo '</small>';
echo '</div>';
echo '</div>';
}
$resultado->close();
}
$conexion->close();
?>
The name and description if it is shown, but I have tried in a thousand ways to show the image and nothing.
Thank you!