buenas, ya he arreglado algo más del index.php, pero no me muestra las imágenes:
index.php
Código:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="css/estilos.css" />
<script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="js/funciones.js"></script>
<title>Galería de Imágenes</title>
</head>
<body>
<div id="galeria">
<h1>Mi galería de imágenes</h1>
<?php
$conexion = new mysqli('localhost', 'historiador', 'pasado', 'historia');
/*$consulta = "SELECT id, titulo, descripcion, archivo FROM imagen";*/
$consulta = "SELECT codacontecimiento, imagen FROM imagen";
$resultado = $conexion->query($consulta);
var_dump($resultado);
while($filas = $resultado->fetch_array(MYSQLI_ASSOC)) {
?>
<a href="visor.php?id=<?php echo $filas['codacontecimiento']; ?>"><img src="img/t-<?php echo $filas['imagen']; ?>" alt="imagen" /></a>
<?php
}
?>
</div>
</body>
</html>
en visor.php ya me llega el id según el var_dump:
string(57) "SELECT codacontecimiento, imagen FROM imagen WHERE id = 4"
pero creo que es culpa del index.php.... Es decir en index.php me tendría que mostrar las imágenes que tengo, es decir se ven los recuadros, pero no las imágenes...