-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgaleriaPrdts.php
49 lines (48 loc) · 1.52 KB
/
galeriaPrdts.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?php
if (!isset ($_REQUEST['produto'])){
header('location:index.php');
}
include "_header.php";
include "_leftBar.php";
$prdtId = $_GET["produto"];
//********************************************************************
//*******ACEDER Á BD produts E RETIRAR TODOS COM O ID=$prdtId*********
//********************************************************************
?>
<div id="center" class="content">
<?php
ligarBD();
$cmd = "SELECT * FROM produts WHERE produtoCatId = '$prdtId'";
$recurso = mysql_query($cmd);
while ($row = mysql_fetch_array($recurso)){
?>
<div class="fotoPrdt">
<a href="produto.php?produto=<?php echo $row['id'] ?>">
<img class="imgPrdt" src="imagens/produtos/<?php echo $row['foto'];?>">
<a href="php/produto.php?produto=<?php echo $row['id'] ?>">
</div>
<div class="nomePrdt">
<a href="produto.php?produto=<?php echo $row['id'] ?>">
<h3><?php echo $row['nome'];?></h3>
</a>
</div>
<div class="descPeqPrdt">
<?php echo $row['descricaoPeq'];?>
</div>
<div class="preco">
<span>PREÇO </span>
<span class="valor"><?php echo "€ ".$row['preco'];?></span>
</div>
<div class="btVer">
<a href="produto.php?produto=<?php echo $row['id']?>" style="text-decoration:none">
<input type="button" class="bt" value="Ver Produto">
</a>
</div>
<div class="separador"></div>
<?php
}
?>
</div>
<?php
include "_footer.php";
?>