1
I am learning the ninja arts of PHP and my code is giving a little headache.
<div class="container">
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
<section class="painel novidades">
<h2>Novidades</h2>
<ol>
<?php
$sql = mysql_query("SELECT * FROM produtos");
while($produtos = mysql_fetch_assoc($sql)){
echo "<li>;
<a href=\"produto.php?\" id=<?php echo $id ?>>;
<figure>;
<img class=\"foto\" src=\"img/produtos/miniatura2.png\">;
"<figcaption>.$exibe[nome].$exibe[valor].</figcaption>";
</figure>;
</a>;
</li>";
}
?>
The intention is to show the products coming straight from the database, obviously will be the same product, but what is wrong there? (The connection to the database has already been made further up in the code).
What’s the mistake you’re making?
– Ricardo
Parse error: syntax error, Unexpected '>' in /home/Thiago/novosite/index.php on line 45, when there is this error one appears in the place of each image saying that the variables were not found if I am not mistaken, "if I am not mistaken"
– Bussola