0
As imagens não aparecem na pagina
<?php
$banco = new mysqli("localhost", "root", "","bd");
$sql = "SELECT arquivo FROM lojas";
$resultado = $banco->query($sql);
while($linha = mysqli_fetch_array($resultado)){
$album[] = $linha;
}
?>
<!DOCTYPE>
<html lang="pt-br">
<head>
<meta charset="utf-8">
<link rel = "stylesheet" type = "text/css" href = "style.php">
</head>
<body>
<header>
<table>
<tr>
<?php
foreach($album as $foto){
?>
<td>
<img src="<?php echo "./imagens/".$foto["nome"] ?>" width="260" height="200"/>
<td>
<?php }
?>
</tr>
</table>
We’d have to be one
Hacker
to find the structure of your table in the database to see the column names and make a correction in the declarationSELECT
or in$foto["nome"]
inside the foreach– user60252